Move folder errors to state

The "Invalid" config attribute is retained for errors discovered during
config loading (empty path, duplicate ID). This can only be set or
cleared at config loading time.

Errors discovered during runtime (I/O problems, etc) are now in the
folder state instead. Changes to these are sent as any other folder
state change.
This commit is contained in:
Jakob Borg
2015-04-13 05:12:01 +09:00
parent a027a60f5d
commit aa803ce2ff
11 changed files with 128 additions and 108 deletions

View File

@@ -245,8 +245,8 @@ func (p *rwFolder) Serve() {
// Potentially sets the error twice, once in the scanner just
// by doing a check, and once here, if the error returned is
// the same one as returned by CheckFolderHealth, though
// duplicate set is handled by SetFolderError
p.model.cfg.SetFolderError(p.folder, err)
// duplicate set is handled by setError.
p.setError(err)
rescheduleScan()
continue
}