]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
ls: print correct xattr error on all platforms
authorPádraig Brady <P@draigBrady.com>
Fri, 28 Mar 2025 20:24:18 +0000 (20:24 +0000)
committerPádraig Brady <P@draigBrady.com>
Sun, 30 Mar 2025 14:12:52 +0000 (15:12 +0100)
* src/ls.c (gobble_file): Output errno, as u.err
is not populated by file_has_aclinfo() on all platforms.
* NEWS: Mention the bug fix.

NEWS
src/ls.c

diff --git a/NEWS b/NEWS
index dfafa8ab22c10e2e2577130b8e78707fdd31cfe1..a77a49f74f204d168b2339274a5ff20271d7cbcd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,10 @@ GNU coreutils NEWS                                    -*- outline -*-
   on systems like Android with SELinux but without xattr support.
   [bug introduced in coreutils-9.6]
 
+  `ls -l` could output spurious "Not supported" errors in certain cases,
+  like with dangling symlinks on cygwin.
+  [bug introduced in coreutils-9.6]
+
   'who -m' now outputs entries for remote logins.  Previously login
   entries prefixed with the service (like "sshd") were not matched.
   [bug introduced in coreutils-9.4]
index 244484439ff8f3114f8a4561308388de88a26e04..46ec42037b82f1ed3a0bf2ea96c8829003c7720d 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -3549,7 +3549,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
       any_has_acl |= f->acl_type != ACL_T_NONE;
 
       if (format == long_format && n < 0 && !cannot_access_acl)
-        error (0, ai.u.err, "%s", quotef (full_name));
+        error (0, errno, "%s", quotef (full_name));
       else
         {
           /* When requesting security context information, don't make