mirror of
https://github.com/octoleo/syncthing.git
synced 2025-04-10 19:41:50 +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(".")
|
usage, err := fs.Usage(".")
|
||||||
if err != nil {
|
|
||||||
return fmt.Errorf("failed to check available storage space")
|
|
||||||
}
|
|
||||||
|
|
||||||
if req.Percentage() {
|
if req.Percentage() {
|
||||||
freePct := (float64(usage.Free) / float64(usage.Total)) * 100
|
freePct := (float64(usage.Free) / float64(usage.Total)) * 100
|
||||||
if err == nil && freePct < val {
|
if err == nil && freePct < val {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user