ls: Lazily align the number of hard links in ls output :^)

Fixes #5155
This commit is contained in:
Andreas Kling 2021-01-29 23:05:02 +01:00
parent 0558c74e30
commit 4ab2ff95ce
Notes: sideshowbarker 2024-07-18 22:45:13 +09:00

View file

@ -288,7 +288,7 @@ static bool print_filesystem_object(const String& path, const String& name, cons
else
printf("%c", st.st_mode & S_IXOTH ? 'x' : '-');
printf(" %u", st.st_nlink);
printf(" %3u", st.st_nlink);
auto username = users.get(st.st_uid);
if (!flag_print_numeric && username.has_value()) {