File without extension is created when trying to move a shared folder inside another shared folder
Expected behaviour
Folder "AA1" is inside folder "BB".
Actual behaviour
There is a file called "AA1" without extension instead of a folder called "AA1" and it's possible to see it in the server logged as user1 or user2
Steps to reproduce
-
There are two users in the server (user1 and user2)
-
In the server, log in owncloud as user 1
-
Share a folder called "AA" and a folder called "BB" with user2.
-
Inside folder "AA", there is a folder called "AA1" with files inside it.
-
Give user2 all the permission (create, update, delete) in both folders
-
Now using webdav protocol, try to move the folder "AA1" from "AA" to "BB". Notice that all the folders involve are shared folders. Also notice that you have the correct permission to do the action. We are going to see do it using poster (complement in firefox)
- URL:server/remote.php/webdav/Shared/AA/AA1 - User: user2 - password: - Action: MOVE - Headers * Destination: server/remote.php/webdav/BB/AA1 * Overwrite T
-
The action is done
-
In the server, logged as user1 or user2, access to folder "BB" an there is a file without extension called "AA1"
Server configuration
Operating system: openSUSE
Database: SQLite 3
ownCloud version: {"installed":"true","version":"5.80.8.1","versionstring":"6.0 pre alpha","edition":""}
Client configuration
Browser: Chrome
Operating system: MaOs 10.7.5
@purigarcia @rperezb can I ask you to retest this with the latest git master? THX
tested with {"installed":"true","version":"5.0.0.1","versionstring":"6.0 alpha 2","edition":""} Same behavior, a file without extension is created instead of the folder
The implementation Shared_Storage::rename() and Shared_Storage::copy() are only handling files as source but not folders. see https://github.com/owncloud/core/blob/master/apps/files_sharing/lib/sharedstorage.php#L294
@icewind1991 Can I ask you to have a look at this? THX
@karlitschek as we can loose data due to this bug I consider this critical -> Panic label attached
Checked https://github.com/owncloud/core/pull/5805 and it works