]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Fix a bug in how the LS_COLORS ln=target attribute is handled.
authorEric Blake <ebb9@byu.net>
Sat, 7 Apr 2007 18:14:07 +0000 (20:14 +0200)
committerJim Meyering <jim@meyering.net>
Sat, 7 Apr 2007 18:14:07 +0000 (20:14 +0200)
* src/ls.c (gobble_file): Use "stat" (not lstat) also when the
ln=target attribute applies.  Reported by Kirk Kelsey.

ChangeLog
src/ls.c

index 46b7b02ae0a0cfc676c76cdbb20d27ba3abedf98..f95dcfd8623276a6aa67217a1aec55c1c707f75f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-04-07  Eric Blake  <ebb9@byu.net>
+
+       Fix a bug in how the LS_COLORS ln=target attribute is handled.
+       * src/ls.c (gobble_file): Use "stat" (not lstat) also when the
+       ln=target attribute applies.  Reported by Kirk Kelsey.
+
 2007-04-02  Jim Meyering  <jim@meyering.net>
 
        * src/copy.c (copy_reg): Initialize local "con", before calling
index abb0a2692668db78b0ed0749cfc72d03240580ac..6ee67751be98412863bc80aa4e4adbcab6be108f 100644 (file)
--- a/src/ls.c
+++ b/src/ls.c
@@ -2577,7 +2577,8 @@ gobble_file (char const *name, enum filetype type, ino_t inode,
       || ((print_inode || format_needs_type)
          && (type == symbolic_link || type == unknown)
          && (dereference == DEREF_ALWAYS
-             || (command_line_arg && dereference != DEREF_NEVER)))
+             || (command_line_arg && dereference != DEREF_NEVER)
+             || color_symlink_as_referent))
       /* 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)