mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-08 23:08:27 +00:00
This commit is contained in:
parent
b628460930
commit
a65b46debd
@ -484,10 +484,11 @@ func (f *folder) scanSubdirs(subDirs []string) error {
|
|||||||
// What we have locally is equivalent to the global file.
|
// What we have locally is equivalent to the global file.
|
||||||
fi.Version = fi.Version.Merge(gf.Version)
|
fi.Version = fi.Version.Merge(gf.Version)
|
||||||
fallthrough
|
fallthrough
|
||||||
case fi.IsDeleted() && gf.IsReceiveOnlyChanged():
|
case fi.IsDeleted() && (gf.IsReceiveOnlyChanged() || gf.IsDeleted()):
|
||||||
// Our item is deleted and the global item is our own
|
// Our item is deleted and the global item is our own
|
||||||
// receive only file. We can't delete file infos, so
|
// receive only file or deleted too. In the former
|
||||||
// we just pretend it is a normal deleted file (nobody
|
// case we can't delete file infos, so we just
|
||||||
|
// pretend it is a normal deleted file (nobody
|
||||||
// cares about that).
|
// cares about that).
|
||||||
fi.LocalFlags &^= protocol.FlagLocalReceiveOnly
|
fi.LocalFlags &^= protocol.FlagLocalReceiveOnly
|
||||||
}
|
}
|
||||||
@ -624,10 +625,6 @@ func (f *folder) scanSubdirs(subDirs []string) error {
|
|||||||
// sure the file gets in sync on the following pull.
|
// sure the file gets in sync on the following pull.
|
||||||
nf.Version = protocol.Vector{}
|
nf.Version = protocol.Vector{}
|
||||||
}
|
}
|
||||||
// Check for deleted, locally changed items that noone else has.
|
|
||||||
if f.localFlags&protocol.FlagLocalReceiveOnly != 0 && len(snap.Availability(file.Name)) == 0 {
|
|
||||||
file.LocalFlags &^= protocol.FlagLocalReceiveOnly
|
|
||||||
}
|
|
||||||
l.Debugln("marking file as deleted", nf)
|
l.Debugln("marking file as deleted", nf)
|
||||||
batchAppend(nf, snap)
|
batchAppend(nf, snap)
|
||||||
changes++
|
changes++
|
||||||
|
Loading…
x
Reference in New Issue
Block a user