* src/ls.c (gobble_file): Directory args don't have their
ACL or security context displayed, so avoid to the lookup.
E.g. this results in the same number of xattr calls with
`ls -l .` and `ls -l`.
---
src/ls.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/ls.c b/src/ls.c
index 4703ce927..288b657a2 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -3480,7 +3480,7 @@ gobble_file (char const *name, enum filetype type, ino_t
inode,
bool get_scontext = (format == long_format) | print_scontext;
bool check_capability = format_needs_capability & (type == normal);
- if (get_scontext | check_capability)
+ if (type != arg_directory && (get_scontext | check_capability))
{
struct aclinfo ai;
int aclinfo_flags = ((do_deref ? ACL_SYMLINK_FOLLOW : 0)
--
2.55.0