Recalculate free minimum disk space (#2788)

* Fix calculating free space disk by using blocks available for unprivileged user

* Use fixed minimal free disk space instead of percentage
This commit is contained in:
Anis Elleuch
2016-09-27 20:46:38 +01:00
committed by Harshavardhana
parent 70d52bbc4c
commit 9417614a8e
2 changed files with 21 additions and 19 deletions

View File

@@ -31,7 +31,7 @@ func GetInfo(path string) (info Info, err error) {
}
info = Info{}
info.Total = int64(s.Bsize) * int64(s.Blocks)
info.Free = int64(s.Bsize) * int64(s.Bfree)
info.Free = int64(s.Bsize) * int64(s.Bavail)
info.Files = int64(s.Files)
info.Ffree = int64(s.Ffree)
info.FSType, err = getFSType(path)