cozy-labs / cozy-desktop

File Synchronisation for Cozy on Desktop and Laptop
https://cozy-labs.github.io/cozy-desktop/
GNU Affero General Public License v3.0
99 stars 45 forks source link

fix: Handle send to trash errors #2296

Closed taratatach closed 1 year ago

taratatach commented 1 year ago

Sending a document to the trash can fail for various reasons, one of them being the absence of a trash (e.g. on Windows network shares).

In this case the document would remain in the user's local synchronization directory while it's been deleted on their Cozy. To prevent this state, we'll catch trash errors and try to permanently delete the document.

In a second time, we might want to mark the trashed document on the remote Cozy to alert the user that document might not be recoverable from a local trash (if all connected Desktops's OSes don't have a working trash for example).

Please make sure the following boxes are checked: