Skip to content

Conversation

@sgmarz
Copy link

@sgmarz sgmarz commented Dec 29, 2025

The following PR fixes issue #9912.

There is now an added else statement in src/uu/ls/src/ls.rs if neither the security context nor FACL symbols are present to add two spaces instead of just one.

This patch is minimally invasive, however the testing suite was also updated to allow for the . or + symbols as well as a space. Simply, the regex in test_ls.rs was changed from [.+]? to [.+ ]?.

With this PR, the columns now line up properly even when the security context (.) or FACL symbols (+) are present or mixed as demonstrated below:

~> ls_cl_padding/coreutils ls -laF
total 4
drwxr-xr-x   1 root root   34 Dec 29 13:33 ./
drwxr-xr-x  20 root root 4096 Dec 26 12:57 ../
-rw-r--r--   1 root root    0 Dec 29 13:33 abc
drwxrwxr-x+  1 root root  302 Dec 22 20:36 cbin/
-rw-r--r--   1 root root    0 Dec 29 13:33 def
-rw-r--r--   1 root root    0 Dec 29 13:33 ghi
drwxrwxr-x+  1 root root   98 Dec 28 05:54 http/

@sylvestre
Copy link
Contributor

sorry, it needs to be rebased

@ChrisDryden
Copy link
Collaborator

The underlying issue was already addressed in #8793

@ChrisDryden ChrisDryden reopened this Feb 11, 2026
@ChrisDryden
Copy link
Collaborator

Sorry did more testing and checked the original issue and I see that there is still a bug. I think there is a conflict now with the other fix now because it adds additional padding. Would it be possible to take a look again a the use cases now that the other PR is merged? Maybe making a test case that shows the +27 in the issue having the padding?

@github-actions
Copy link

GNU testsuite comparison:

GNU test failed: tests/misc/selinux. tests/misc/selinux is passing on 'main'. Maybe you have to rebase?

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.

3 participants