haiwen / seafile-client

Seafile desktop client.
http://seafile.com
Apache License 2.0
469 stars 280 forks source link

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

Open pmdevita opened 1 year ago

pmdevita commented 1 year ago

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.

killing commented 1 year ago

We'll look into this issue.

pmdevita commented 3 days ago

Any update on this by chance?

killing commented 2 days ago

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

pmdevita commented 2 days ago

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