From 0901350087496d441a3e0ae68c7b0dbe179e2f82 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Mon, 20 Nov 2017 16:29:36 +0000 Subject: [PATCH] lib/model: Trigger a pull when ignore patterns change GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4532 --- lib/model/folder.go | 2 -- lib/model/model.go | 5 ++--- lib/model/rwfolder.go | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/model/folder.go b/lib/model/folder.go index 38da32fa1..4206b6494 100644 --- a/lib/model/folder.go +++ b/lib/model/folder.go @@ -50,8 +50,6 @@ func (f *folder) DelayScan(next time.Duration) { f.scan.Delay(next) } -func (f *folder) IndexUpdated() {} - func (f *folder) IgnoresUpdated() { if f.FSWatcherEnabled { f.scheduleWatchRestart() diff --git a/lib/model/model.go b/lib/model/model.go index 59798b5a0..26ad628ff 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -47,9 +47,8 @@ const ( type service interface { BringToFront(string) DelayScan(d time.Duration) - IndexUpdated() // Remote index was updated notification - IgnoresUpdated() // ignore matcher was updated notification - SchedulePull() + IgnoresUpdated() // ignore matcher was updated notification + SchedulePull() // something relevant changed, we should try a pull Jobs() ([]string, []string) // In progress, Queued Scan(subs []string) error Serve() diff --git a/lib/model/rwfolder.go b/lib/model/rwfolder.go index 44dd5e067..32ea09385 100644 --- a/lib/model/rwfolder.go +++ b/lib/model/rwfolder.go @@ -1728,7 +1728,7 @@ func (f *sendReceiveFolder) basePause() time.Duration { func (f *sendReceiveFolder) IgnoresUpdated() { f.folder.IgnoresUpdated() - f.IndexUpdated() + f.SchedulePull() } // A []fileError is sent as part of an event and will be JSON serialized.