-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core/remote: Conflicts use most recent update date (#2053)
When a remote document is renamed with a remote conflict by Sync instead of Merge, we use a dedicated method, `Remote.resolveRemoteConflict()`. We were assuming in this method that the current date would always be the most recent one compared to the last modification date on the remote Cozy for the document with the given name. However, there are multiple situations in which this would not be the case and `cozy-stack` would thus reject the renaming: - the computer's time is off and late - the modification date on the remote Cozy was set to a date in the future To make sure the Cozy will not reject the renaming of the remote document, we fetch the remote modification date with the remote _id and revision and use the most recent date between the current date and the remote one.
- Loading branch information
1 parent
33f7874
commit e92a8d7
Showing
2 changed files
with
85 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters