lib/model: Don't check folder health if there is nothing to pull (fixes #2497) (#5255)

This commit is contained in:
Simon Frei 2018-10-11 11:33:21 +02:00 committed by Jakob Borg
parent 9d7a811e72
commit 1b10607def

View File

@ -141,11 +141,6 @@ func (f *sendReceiveFolder) pull() bool {
return true
}
if err := f.CheckHealth(); err != nil {
l.Debugln("Skipping pull of", f.Description(), "due to folder error:", err)
return true
}
f.model.fmut.RLock()
curIgnores := f.model.folderIgnores[f.folderID]
folderFiles := f.model.folderFiles[f.folderID]
@ -161,6 +156,11 @@ func (f *sendReceiveFolder) pull() bool {
return true
}
if err := f.CheckHealth(); err != nil {
l.Debugln("Skipping pull of", f.Description(), "due to folder error:", err)
return true
}
curIgnoreHash := curIgnores.Hash()
ignoresChanged := curIgnoreHash != f.prevIgnoreHash