summaryrefslogtreecommitdiff
path: root/src/ls.c
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2007-04-07 20:14:07 +0200
committerJim Meyering <jim@meyering.net>2007-04-07 20:14:07 +0200
commitd63623eb7cd6a086e52f58b02fecdd2c41b9e402 (patch)
tree3f8c7f18cb779b1afac332387227ae4d9bdec656 /src/ls.c
parentabdf924333bdf5bf7443e3b7ae68fbaddfe0cfb4 (diff)
downloadcoreutils-d63623eb7cd6a086e52f58b02fecdd2c41b9e402.tar.xz
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.
Diffstat (limited to 'src/ls.c')
-rw-r--r--src/ls.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ls.c b/src/ls.c
index abb0a2692..6ee67751b 100644
--- 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)