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
98 stars 45 forks source link

core/sync: Dir creation before moves from outside #2237

Closed taratatach closed 2 years ago

taratatach commented 2 years ago

When content is moved to a directory that was just created (and not synced yet), we would try to synchronize the move first. This would raise synchronization errors as the directory would not exist on the other side. It would eventually work after retrying (since we would finally get to synchronize the directory creation) but this slows down synchronization (especially if a lot of documents were moved to the directory) and could be the source of more problems (de-synchronized states is never good).

Simply adding a comparison rule between these changes forces the synchronization of the directory's creation first and prevents retries for the content move.

Please make sure the following boxes are checked: