lib/model: Set empty version when unignoring deleted files (fixes 6038) (#6039)

This commit is contained in:
Simon Frei
2019-10-01 15:34:59 +02:00
committed by Jakob Borg
parent cff7a091f5
commit a2a14c8424
2 changed files with 130 additions and 15 deletions

View File

@@ -512,12 +512,11 @@ func (f *folder) scanSubdirs(subDirs []string) error {
LocalFlags: f.localFlags,
}
// We do not want to override the global version
// with the deleted file. Keeping only our local
// counter makes sure we are in conflict with any
// other existing versions, which will be resolved
// by the normal pulling mechanisms.
// with the deleted file. Setting to an empty
// version makes sure the file gets in sync on
// the following pull.
if file.ShouldConflict() {
nf.Version = nf.Version.DropOthers(f.shortID)
nf.Version = protocol.Vector{}
}
batch.append(nf)