seafile-client icon indicating copy to clipboard operation
seafile-client copied to clipboard

Seadrive accidentally deletes files that have yet to be synced when clicking "Free up space"

Open pmdevita opened this issue 2 years ago • 4 comments
trafficstars

This issue occurred for me on Windows 10, I don't know about other platforms but considering this seems to be an issue with the sync logic, I would suspect a similar problem could occur.

Steps to reproduce

  1. Copy a folder with a lot of files into a Seadrive share
  2. After some of the files inside the folder have synced, right click on the parent folder and select "Free up space"
  3. Seadrive will then remove all of the files from the folder, including files that have yet to be synced, effectively deleting them, and causing confusion between the server and client.

Seadrive then reports errors in it's log like this

[03/03/23 02:45:32] dir parent_folder/subfolder doesn't exist in repo repohash.
[03/03/23 02:45:32] Failed to get path parent_folder/subfolder/image.jpg for repo repohash.

I think a check should be added to ensure all files have been synced to the server before freeing it, or that only files synced to the server should be freed.

pmdevita avatar Mar 04 '23 01:03 pmdevita

We'll look into this issue.

killing avatar Apr 17 '23 03:04 killing

Any update on this by chance?

pmdevita avatar Sep 11 '24 03:09 pmdevita

This has been fixed in some version. You should not see this issue with the latest version.

killing avatar Sep 12 '24 02:09 killing

Great, thank you! I'll give it another test and close the issue if it works alright

pmdevita avatar Sep 12 '24 03:09 pmdevita

This does appear to be fixed, just tried it again and now Seadrive now only immediately deletes files that have been uploaded to the cloud and it waits for each remaining file to upload before removing the local copy. Thank you!

pmdevita avatar Sep 30 '24 04:09 pmdevita