mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-08 22:31:04 +00:00
parent
61302c467c
commit
ddfa82e990
@ -64,6 +64,8 @@ func newReceiveOnlyFolder(model *model, fset *db.FileSet, ignores *ignore.Matche
|
||||
}
|
||||
|
||||
func (f *receiveOnlyFolder) Revert() {
|
||||
l.Infof("Reverting folder %v", f.Description)
|
||||
|
||||
f.setState(FolderScanning)
|
||||
defer f.setState(FolderIdle)
|
||||
|
||||
@ -89,6 +91,7 @@ func (f *receiveOnlyFolder) Revert() {
|
||||
return true
|
||||
}
|
||||
|
||||
fi.LocalFlags &^= protocol.FlagLocalReceiveOnly
|
||||
if len(fi.Version.Counters) == 1 && fi.Version.Counters[0].ID == f.shortID {
|
||||
// We are the only device mentioned in the version vector so the
|
||||
// file must originate here. A revert then means to delete it.
|
||||
@ -113,7 +116,6 @@ func (f *receiveOnlyFolder) Revert() {
|
||||
// either, so we will not create a conflict copy of our local
|
||||
// changes.
|
||||
fi.Version = protocol.Vector{}
|
||||
fi.LocalFlags &^= protocol.FlagLocalReceiveOnly
|
||||
}
|
||||
|
||||
batch = append(batch, fi)
|
||||
|
@ -97,6 +97,8 @@ func (f *sendOnlyFolder) pull() bool {
|
||||
}
|
||||
|
||||
func (f *sendOnlyFolder) Override() {
|
||||
l.Infof("Overriding global state on folder %v", f.Description)
|
||||
|
||||
f.setState(FolderScanning)
|
||||
batch := make([]protocol.FileInfo, 0, maxBatchSizeFiles)
|
||||
batchSizeBytes := 0
|
||||
|
Loading…
Reference in New Issue
Block a user