]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
ls --color once again colors dangling symlinks correctly
authorEric Blake <ebb9@byu.net>
Tue, 24 Apr 2007 07:18:56 +0000 (09:18 +0200)
committerJim Meyering <jim@meyering.net>
Tue, 24 Apr 2007 07:18:56 +0000 (09:18 +0200)
* src/ls.c (gobble_file): Much like the 2007-04-07 fix,
add a term to the expression that decides whether we need
stat and/or lstat calls.  Reported by Andreas Frische.

ChangeLog
src/ls.c

index 280cf2a0b7d05e839e74573721848fcd3f5367a4..b90878cf9803d9713b6d21d4d22e1ed5a188e65d 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-04-24  Eric Blake  <ebb9@byu.net>
+
+       ls --color once again colors dangling symlinks correctly
+       * src/ls.c (gobble_file): Much like the 2007-04-07 fix,
+       add a term to the expression that decides whether we need
+       stat and/or lstat calls.  Reported by Andreas Frische.
+
 2007-04-16  Jim Meyering  <jim@meyering.net>
 
        * src/cut.c (usage): Adjust synopsis to show that an OPTION is required.
index f412dff09a9341e76029d4e8a627829ddf281402..c0e332b3b2a1bf4f6eac8f59d99f4e5414a91d1c 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -2578,7 +2578,7 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
          && (type == symbolic_link || type == unknown)
          && (dereference == DEREF_ALWAYS
              || (command_line_arg && dereference != DEREF_NEVER)
-             || color_symlink_as_referent))
+             || color_symlink_as_referent || check_symlink_color))
       /* Command line dereferences are already taken care of by the above
         assertion that the inode number is not yet known.  */
       || (print_inode && inode == NOT_AN_INODE_NUMBER)