()
| 363 | } |
| 364 | |
| 365 | func (f *folder) getHealthErrorWithoutIgnores() error { |
| 366 | // Check for folder errors, with the most serious and specific first and |
| 367 | // generic ones like out of space on the home disk later. |
| 368 | |
| 369 | if err := f.CheckPath(); err != nil { |
| 370 | return err |
| 371 | } |
| 372 | |
| 373 | if minFree := f.model.cfg.Options().MinHomeDiskFree; minFree.Value > 0 { |
| 374 | dbPath := locations.Get(locations.Database) |
| 375 | if usage, err := fs.NewFilesystem(fs.FilesystemTypeBasic, dbPath).Usage("."); err == nil { |
| 376 | if err = config.CheckFreeSpace(minFree, usage); err != nil { |
| 377 | return fmt.Errorf("insufficient space on disk for database (%v): %w", dbPath, err) |
| 378 | } |
| 379 | } |
| 380 | } |
| 381 | |
| 382 | return nil |
| 383 | } |
| 384 | |
| 385 | func (f *folder) pull(ctx context.Context) (success bool, err error) { |
| 386 | f.pullFailTimer.Stop() |
no test coverage detected