lib/config: Improve clarity of free space errors (fixes #8180) (#8191)

This commit is contained in:
Jakob Borg
2022-02-24 17:07:51 +01:00
committed by GitHub
parent 10f9d95cd2
commit f890fe6fd3
4 changed files with 12 additions and 10 deletions
+1 -1
View File
@@ -329,7 +329,7 @@ func (f *folder) getHealthErrorWithoutIgnores() 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 errors.Wrapf(err, "insufficient space on disk for database (%v)", dbPath)
return fmt.Errorf("insufficient space on disk for database (%v): %w", dbPath, err)
}
}