From a04ddb8dd3fffd3457f927a36f6840fc1465aba2 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Sun, 16 Sep 2012 04:10:50 +0100 Subject: ls: fix coloring of dangling symlinks in default listing mode When listing a directory containing dangling symlinks, and not outputting a long format listing, and orphaned links are set to no coloring in LS_COLORS, then the symlinks would get no color rather than reverting to the standard symlink color. The issue was introduced in v8.13-19-g84457c4 * src/ls.c (print_color_indicator): Use the standard method to check if coloring is specified for orphaned symlinks. The existing method would consider 'or=00' or 'or=0' as significant in LS_COLORS. Even 'or=' was significant as in that case the string='or=' and the length=0. Also apply the same change for missing symlinks for consistency. (gobble_file): Remove the simulation of linkok, which is only tested in print_color_indicator() which now handles this directly by keying on the LS_COLORS values correctly. * tests/misc/ls-misc.pl: Add a test case. * THANKS: Add the reporter. * NEWS: Mention the fix. Reported-by: David Matei --- THANKS.in | 1 + 1 file changed, 1 insertion(+) (limited to 'THANKS.in') diff --git a/THANKS.in b/THANKS.in index 2c3f83cdc..b0061b3dd 100644 --- a/THANKS.in +++ b/THANKS.in @@ -153,6 +153,7 @@ David Godfrey dave@delta.demon.co.uk David Luyer david_luyer@pacific.net.au David Madore david.madore@ens.fr David Malone dwmalone@cnri.dit.ie +David Matei matei@cs.toronto.edu Davide Canova kc.canova@gmail.com Dawson Engler engler@stanford.edu Dean Gaudet dean-savannah@arctic.org -- cgit v1.2.3-54-g00ecf