Rename target subfolder while moving file into shared folder, data lost
Steps to reproduce
- Create two users "user1" and "user2"
- Login as "user2"
- Create a folder "test" and share it with "user1"
- Login as "user1"
- Create a folder "sub"
- Upload a huge file "huge.dat" into "sub"
- Prepare two cadaver sessions for "user1" (webdav clients)
- In cadaver1: "mv sub test" (this will move the huge file into the shared folder) 9: During the copy, in cadaver2 rename the target folder: "mv test/sub test/x"
Expected result
Either:
- ownCloud recreates the missing parent folder or
- ownCloud notices that the folder is gone and stops/cancels and leaves the source file alone.
Actual result
At the end of both operations, there's a file "test/x/huge.dat" with zero bytes. The source file "huge.dat" is gone. The data is lost.
Apps enabled
files_locking
Versions
ownCloud 8 git master (dc86cbd1e275f01840b304751a02ecbe4043c51e) Very likely to be an older bug.
@icewind1991 @DeepDiver1975
CC @SergioBertolinSG @jnfrmarks for another funny test case to add to the list
Tried this again on master (b67301ef998663df86abe7f24127910e0aa110be) and now the transfer properly aborts. There are no zeroed out files any more, source files are left unchanged.
This is likely to be fixed by https://github.com/owncloud/core/pull/14503 where error detection is improved and the original file is kept in such cases.
Hi , I'm also face this problem https://github.com/owncloud/client/issues/3217#issuecomment-100411841
However I don't get the errors log s