diff --git a/lib/model/folder.go b/lib/model/folder.go index 9d80e1c20..cc197433c 100644 --- a/lib/model/folder.go +++ b/lib/model/folder.go @@ -488,7 +488,7 @@ func (f *folder) scanSubdirs(subDirs []string) error { case !ok: case gf.IsEquivalentOptional(fi, f.modTimeWindow, false, false, protocol.FlagLocalReceiveOnly): // What we have locally is equivalent to the global file. - fi.Version = fi.Version.Merge(gf.Version) + fi.Version = gf.Version fallthrough case fi.IsDeleted() && (gf.IsReceiveOnlyChanged() || gf.IsDeleted()): // Our item is deleted and the global item is our own diff --git a/lib/model/folder_sendonly.go b/lib/model/folder_sendonly.go index b9233ee4a..501e98ad2 100644 --- a/lib/model/folder_sendonly.go +++ b/lib/model/folder_sendonly.go @@ -75,7 +75,6 @@ func (f *sendOnlyFolder) pull() bool { return true } - file.Version = file.Version.Merge(curFile.Version) batch = append(batch, file) batchSizeBytes += file.ProtoSize() l.Debugln(f, "Merging versions of identical file", file) diff --git a/lib/model/folder_sendrecv.go b/lib/model/folder_sendrecv.go index 605ae2079..705c957f3 100644 --- a/lib/model/folder_sendrecv.go +++ b/lib/model/folder_sendrecv.go @@ -595,11 +595,9 @@ func (f *sendReceiveFolder) handleDir(file protocol.FileInfo, snap *db.Snapshot, if !curFile.IsSymlink() && f.inConflict(curFile.Version, file.Version) { // The new file has been changed in conflict with the existing one. We // should file it away as a conflict instead of just removing or - // archiving. Also merge with the version vector we had, to indicate - // we have resolved the conflict. + // archiving. // Symlinks aren't checked for conflicts. - file.Version = file.Version.Merge(curFile.Version) err = f.inWritableDir(func(name string) error { return f.moveForConflict(name, file.ModifiedBy.String(), scanChan) }, curFile.Name) @@ -773,11 +771,9 @@ func (f *sendReceiveFolder) handleSymlinkCheckExisting(file protocol.FileInfo, s if !curFile.IsDirectory() && !curFile.IsSymlink() && f.inConflict(curFile.Version, file.Version) { // The new file has been changed in conflict with the existing one. We // should file it away as a conflict instead of just removing or - // archiving. Also merge with the version vector we had, to indicate - // we have resolved the conflict. + // archiving. // Directories and symlinks aren't checked for conflicts. - file.Version = file.Version.Merge(curFile.Version) return f.inWritableDir(func(name string) error { return f.moveForConflict(name, file.ModifiedBy.String(), scanChan) }, curFile.Name) @@ -1213,10 +1209,6 @@ func (f *sendReceiveFolder) shortcutFile(file, curFile protocol.FileInfo, dbUpda f.fs.Chtimes(file.Name, file.ModTime(), file.ModTime()) // never fails - // This may have been a conflict. We should merge the version vectors so - // that our clock doesn't move backwards. - file.Version = file.Version.Merge(curFile.Version) - dbUpdateChan <- dbUpdateJob{file, dbUpdateShortcutFile} } @@ -1543,11 +1535,9 @@ func (f *sendReceiveFolder) performFinish(file, curFile protocol.FileInfo, hasCu if !curFile.IsDirectory() && !curFile.IsSymlink() && f.inConflict(curFile.Version, file.Version) { // The new file has been changed in conflict with the existing one. We // should file it away as a conflict instead of just removing or - // archiving. Also merge with the version vector we had, to indicate - // we have resolved the conflict. + // archiving. // Directories and symlinks aren't checked for conflicts. - file.Version = file.Version.Merge(curFile.Version) err = f.inWritableDir(func(name string) error { return f.moveForConflict(name, file.ModifiedBy.String(), scanChan) }, curFile.Name)