mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-02 11:58:28 +00:00
lib/model: Mark deleted file as conflicting when un-ignoring (#4776)
This completes #4750 as a followup to #4765.
This commit is contained in:
parent
42cc64e2ed
commit
36251b86f7
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user