mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-09 17:53:59 +00:00
Don't need to sync deletes for nonexistent files
This commit is contained in:
parent
34bd5b9dcf
commit
fd73682806
@ -120,7 +120,12 @@ func (m *Set) Need(id uint) []scanner.File {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if gk.newerThan(rkID[gk.Name]) {
|
if rk, ok := rkID[gk.Name]; gk.newerThan(rk) {
|
||||||
|
if protocol.IsDeleted(gf.File.Flags) && (!ok || protocol.IsDeleted(m.files[rk].File.Flags)) {
|
||||||
|
// We don't need to delete files we don't have or that are already deleted
|
||||||
|
continue
|
||||||
|
}
|
||||||
|
|
||||||
fs = append(fs, gf.File)
|
fs = append(fs, gf.File)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user