mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
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:
parent
b31611a8d1
commit
a69ba18f62
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user