Skip to content

ls: fix link-count column inflating per ACL file#11781

Merged
sylvestre merged 1 commit intouutils:mainfrom
sylvestre:issue-10980
Apr 14, 2026
Merged

ls: fix link-count column inflating per ACL file#11781
sylvestre merged 1 commit intouutils:mainfrom
sylvestre:issue-10980

Conversation

@sylvestre
Copy link
Copy Markdown
Contributor

The +1 accounting for the ACL/context indicator was applied once per item inside the padding loop, so N files with ACLs inflated the link-count column width by N. Apply it a single time after the loop.

Fixes #10980

@github-actions
Copy link
Copy Markdown

GNU testsuite comparison:

GNU test failed: tests/misc/io-errors. tests/misc/io-errors is passing on 'main'. Maybe you have to rebase?
Skip an intermittent issue tests/cut/bounded-memory (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/date/resolution (fails in this run but passes in the 'main' branch)
Skip an intermittent issue tests/tty/tty-eof (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Note: The gnu test tests/expand/bounded-memory is now being skipped but was previously passing.
Congrats! The gnu test tests/dd/no-allocate is now passing!
Congrats! The gnu test tests/printf/printf-surprise is now passing!

@sylvestre sylvestre marked this pull request as ready for review April 12, 2026 20:44
Comment thread src/uu/ls/src/display.rs
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While this works, it feels like a hack because link_count is unrelated to ACL. Maybe it makes sense to add an additional property to PaddingCollection?

The `+1` accounting for the ACL/context indicator was applied once per
item inside the padding loop, so N files with ACLs inflated the
link-count column width by N. Apply it a single time after the loop.

Fixes uutils#10980
@sylvestre sylvestre merged commit 6b044bb into uutils:main Apr 14, 2026
167 of 169 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ls: huge padding when using --long

2 participants