Skip to content

Commit

Permalink
fix: get disk size on dragonfly
Browse files Browse the repository at this point in the history
  • Loading branch information
huskar-t committed Sep 2, 2024
1 parent 7939d38 commit 3405523
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions space_bsd.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ func GetDiskSize(dir string) (total uint64, avail uint64, err error) {
if err != nil {
return 0, 0, err
}
avail = fs.Bavail * uint64(fs.Bsize)
total = fs.Blocks * uint64(fs.Bsize)
avail = uint64(fs.Bavail) * uint64(fs.Bsize)
total = uint64(fs.Blocks) * uint64(fs.Bsize)
return total, avail, nil
}

0 comments on commit 3405523

Please sign in to comment.