1
0
mirror of https://github.com/shirou/gopsutil.git synced 2025-04-26 13:48:59 +08:00

Update disk_unix.go

This commit is contained in:
Ties de Wit 2022-08-29 15:44:23 +02:00 committed by GitHub
parent 43d805cf5d
commit 705a63f1b2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -26,7 +26,7 @@ func UsageWithContext(ctx context.Context, path string) (*UsageStat, error) {
InodesTotal: (uint64(stat.Files)),
InodesFree: (uint64(stat.Ffree)),
}
ret.Used = (uint64(stat.Blocks) - uint64(stat.Bfree)) * uint64(bsize)
if (ret.Used + ret.Free) == 0 {