Skip to content

Commit

Permalink
lib/model: Mark deleted file as conflicting when un-ignoring (#4776)
Browse files Browse the repository at this point in the history
This completes #4750 as a followup to #4765.
  • Loading branch information
imsodin authored and calmh committed Feb 25, 2018
1 parent 42cc64e commit 36251b8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/model/model.go
Expand Up @@ -2066,6 +2066,14 @@ func (m *Model) internalScanFolderSubdirs(ctx context.Context, folder string, su
Deleted: true,
Version: f.Version.Update(m.shortID),
}
// 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.
if f.IsInvalid() {
nf.Version.DropOthers(m.shortID)
}

batch = append(batch, nf)
batchSizeBytes += nf.ProtoSize()
Expand Down

0 comments on commit 36251b8

Please sign in to comment.