Skip to content

Commit

Permalink
lib/model: Some platforms do not support usage checks (fixes syncthin…
Browse files Browse the repository at this point in the history
…g#4321)

GitHub-Pull-Request: syncthing#4322
  • Loading branch information
AudriusButkevicius committed Aug 22, 2017
1 parent b31611a commit a69ba18
Showing 1 changed file with 0 additions and 4 deletions.
4 changes: 0 additions & 4 deletions lib/model/model.go
Original file line number Diff line number Diff line change
Expand Up @@ -2302,10 +2302,6 @@ func (m *Model) checkFreeSpace(req config.Size, fs fs.Filesystem) error {
}

usage, err := fs.Usage(".")
if err != nil {
return fmt.Errorf("failed to check available storage space")
}

if req.Percentage() {
freePct := (float64(usage.Free) / float64(usage.Total)) * 100
if err == nil && freePct < val {
Expand Down

0 comments on commit a69ba18

Please sign in to comment.