Override needs to twiddle the version a bit more (fixes #1564)

This commit is contained in:
Jakob Borg
2015-04-02 10:21:11 +02:00
parent 207b43499c
commit a17333d73e
2 changed files with 224 additions and 1 deletions

View File

@@ -1370,11 +1370,12 @@ func (m *Model) Override(folder string) {
// We are missing the file
need.Flags |= protocol.FlagDeleted
need.Blocks = nil
need.Version = need.Version.Update(m.shortID)
} else {
// We have the file, replace with our version
have.Version = have.Version.Merge(need.Version).Update(m.shortID)
need = have
}
need.Version = need.Version.Update(m.shortID)
need.LocalVersion = 0
batch = append(batch, need)
return true