Dircounts should have a width of 5 when displaying (#2072)

This commit is contained in:
Joe Lim authored and GitHub committed 2025-07-31 17:12:01 +10:00
1 parent b0c3f8dbd7
commit 0a05a7106d
2 files changed
+6 -6

No files matched your search

+5 -5
View File
@@ -301,13 +301,13 @@ func fileInfo(f *file, d *dir, userWidth int, groupWidth int, customWidth int) (
if f.IsDir() && getDirCounts(d.path) {
switch {
case f.dirCount < -1:
info.WriteString(" !")
info.WriteString(" !")
case f.dirCount < 0:
info.WriteString(" ?")
case f.dirCount < 1000:
fmt.Fprintf(&info, " %4d", f.dirCount)
info.WriteString(" ?")
case f.dirCount < 10000:
fmt.Fprintf(&info, " %5d", f.dirCount)
default:
info.WriteString(" 999+")
info.WriteString(" 9999+")
}
continue
}