core icon indicating copy to clipboard operation
core copied to clipboard

Rename target subfolder while moving file into shared folder, data lost

Open PVince81 opened this issue 11 years ago • 2 comments

Steps to reproduce

  1. Create two users "user1" and "user2"
  2. Login as "user2"
  3. Create a folder "test" and share it with "user1"
  4. Login as "user1"
  5. Create a folder "sub"
  6. Upload a huge file "huge.dat" into "sub"
  7. Prepare two cadaver sessions for "user1" (webdav clients)
  8. 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:

  1. ownCloud recreates the missing parent folder or
  2. 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

PVince81 avatar Jan 13 '15 19:01 PVince81

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.

PVince81 avatar Apr 13 '15 11:04 PVince81

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

hoho508 avatar May 09 '15 14:05 hoho508