lib/model: Handle deleted items on RO for remote removes (fixes #6432) (#6464)

This commit is contained in:
Simon Frei
2020-04-02 16:14:25 +02:00
committed by GitHub
parent 2658369051
commit 32245435e2
4 changed files with 89 additions and 4 deletions
+14
View File
@@ -556,6 +556,20 @@ func (f *folder) scanSubdirs(subDirs []string) error {
batch.append(nf)
changes++
}
// Check for deleted, locally changed items that noone else has.
if f.localFlags&protocol.FlagLocalReceiveOnly == 0 {
return true
}
if !fi.IsDeleted() || !fi.IsReceiveOnlyChanged() || len(snap.Availability(fi.FileName())) > 0 {
return true
}
nf := fi.(db.FileInfoTruncated).ConvertDeletedToFileInfo()
nf.LocalFlags = 0
nf.Version = protocol.Vector{}
batch.append(nf)
changes++
return true
})