mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
lib/model: Add initial noop watch cancel func (fixes #4464)
GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4465
This commit is contained in:
parent
9c60bb8336
commit
4b69d0e093
@ -40,6 +40,7 @@ func newFolder(model *Model, cfg config.FolderConfiguration) folder {
|
|||||||
cancel: cancel,
|
cancel: cancel,
|
||||||
model: model,
|
model: model,
|
||||||
initialScanFinished: make(chan struct{}),
|
initialScanFinished: make(chan struct{}),
|
||||||
|
watchCancel: func() {},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,7 +34,7 @@ func (f *sendOnlyFolder) Serve() {
|
|||||||
f.scan.timer.Stop()
|
f.scan.timer.Stop()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
if f.FSWatcherEnabled {
|
if f.FSWatcherEnabled && f.CheckHealth() == nil {
|
||||||
f.startWatch()
|
f.startWatch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -164,7 +164,7 @@ func (f *sendReceiveFolder) Serve() {
|
|||||||
var prevSec int64
|
var prevSec int64
|
||||||
var prevIgnoreHash string
|
var prevIgnoreHash string
|
||||||
|
|
||||||
if f.FSWatcherEnabled {
|
if f.FSWatcherEnabled && f.CheckHealth() == nil {
|
||||||
f.startWatch()
|
f.startWatch()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user