lib/model: Don't info log repeat pull errors (#6149)

This commit is contained in:
Simon Frei
2019-11-19 09:56:53 +01:00
committed by GitHub
parent 28edf2f5bb
commit 0d14ee4142
10 changed files with 77 additions and 54 deletions

View File

@@ -15,6 +15,8 @@ import (
"sync/atomic"
"time"
"github.com/pkg/errors"
"github.com/syncthing/syncthing/lib/config"
"github.com/syncthing/syncthing/lib/db"
"github.com/syncthing/syncthing/lib/events"
@@ -278,7 +280,7 @@ func (f *folder) getHealthError() error {
dbPath := locations.Get(locations.Database)
if usage, err := fs.NewFilesystem(fs.FilesystemTypeBasic, dbPath).Usage("."); err == nil {
if err = config.CheckFreeSpace(f.model.cfg.Options().MinHomeDiskFree, usage); err != nil {
return fmt.Errorf("insufficient space on disk for database (%v): %v", dbPath, err)
return errors.Wrapf(err, "insufficient space on disk for database (%v)", dbPath)
}
}
@@ -297,7 +299,7 @@ func (f *folder) scanSubdirs(subDirs []string) error {
oldHash := f.ignores.Hash()
if err := f.ignores.Load(".stignore"); err != nil && !fs.IsNotExist(err) {
err = fmt.Errorf("loading ignores: %v", err)
err = errors.Wrap(err, "loading ignores")
f.setError(err)
return err
}