lib/model: Some platforms do not support usage checks (fixes #4321)

GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/4322
This commit is contained in:
Audrius Butkevicius 2017-08-22 18:13:58 +00:00
parent b31611a8d1
commit a69ba18f62

View File

@ -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 {