|
@@ -21,6 +21,7 @@ import (
|
|
"github.com/syncthing/syncthing/lib/events"
|
|
"github.com/syncthing/syncthing/lib/events"
|
|
"github.com/syncthing/syncthing/lib/fs"
|
|
"github.com/syncthing/syncthing/lib/fs"
|
|
"github.com/syncthing/syncthing/lib/ignore"
|
|
"github.com/syncthing/syncthing/lib/ignore"
|
|
|
|
+ "github.com/syncthing/syncthing/lib/locations"
|
|
"github.com/syncthing/syncthing/lib/osutil"
|
|
"github.com/syncthing/syncthing/lib/osutil"
|
|
"github.com/syncthing/syncthing/lib/protocol"
|
|
"github.com/syncthing/syncthing/lib/protocol"
|
|
"github.com/syncthing/syncthing/lib/scanner"
|
|
"github.com/syncthing/syncthing/lib/scanner"
|
|
@@ -269,8 +270,11 @@ func (f *folder) getHealthError() error {
|
|
return err
|
|
return err
|
|
}
|
|
}
|
|
|
|
|
|
- if err := f.model.cfg.CheckHomeFreeSpace(); err != nil {
|
|
|
|
- return err
|
|
|
|
|
|
+ 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 nil
|
|
return nil
|