fix!: use int64 for file sizes (#2397)
* fix!: use `int64` for file sizes Unfortunately Go templates cannot unconditionally dereference pointers, so we use a magic value of -1 instead of a nil pointer to indicate a file size that doesn't exist. This also means having to change surrounding code, for example the `humanize` function. * Update `CHANGELOG.md`
This commit is contained in:
1 parent
9ab0fd4de0
commit
3637f5f3f8
11 files changed
+44
-51
No files matched your search
+1
-1
@@ -15,5 +15,5 @@ func diskFree(wd string) string {
|
||||
}
|
||||
|
||||
// Available blocks * size per block = available space in bytes
|
||||
return "df: " + humanize(uint64(stat.F_bavail)*uint64(stat.F_bsize))
|
||||
return "df: " + humanize(int64(stat.F_bavail)*int64(stat.F_bsize))
|
||||
}
|
||||
Reference in new issue
Block a user