From 1d85945321f9118010740785f433d0be18bcbf1a Mon Sep 17 00:00:00 2001 From: Eric Blake Date: Tue, 24 Apr 2007 09:18:56 +0200 Subject: 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. --- ChangeLog | 7 +++++++ src/ls.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 280cf2a0b..b90878cf9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-04-24 Eric Blake + + 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 * src/cut.c (usage): Adjust synopsis to show that an OPTION is required. diff --git a/src/ls.c b/src/ls.c index f412dff09..c0e332b3b 100644 --- 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) -- cgit v1.2.3-54-g00ecf