lib/model: Don't pull if ignores failed to load and cleanup (#5418)

This commit is contained in:
Simon Frei
2019-01-01 10:17:14 +01:00
committed by Jakob Borg
parent 48dab8f201
commit 47e08797cb
3 changed files with 26 additions and 20 deletions

View File

@@ -197,7 +197,7 @@ func (f *folder) DelayScan(next time.Duration) {
f.Delay(next)
}
func (f *folder) IgnoresUpdated() {
func (f *folder) ignoresUpdated() {
if f.FSWatcherEnabled {
f.scheduleWatchRestart()
}
@@ -310,8 +310,9 @@ func (f *folder) scanSubdirs(subDirs []string) error {
oldHash := ignores.Hash()
defer func() {
if ignores.Hash() != oldHash {
l.Debugln("Folder", f.ID, "ignore patterns changed; triggering puller")
f.IgnoresUpdated()
l.Debugln("Folder", f.Description(), "ignore patterns change detected while scanning; triggering puller")
f.ignoresUpdated()
f.SchedulePull()
}
}()