GNU bug report logs - #12445
ls --color does not color symlinks when not resolving them

Previous Next

Package: coreutils;

Reported by: Matei David <matei <at> cs.toronto.edu>

Date: Fri, 14 Sep 2012 17:06:01 UTC

Severity: normal

Tags: fixed, notabug

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Matei David <matei <at> cs.toronto.edu>
To: 12445 <at> debbugs.gnu.org
Subject: bug#12445: ls --color does not color symlinks when not resolving them
Date: Fri, 14 Sep 2012 12:54:51 -0400
[Message part 1 (text/plain, inline)]
When the ORPHAN property is disabled in dircolors, ls --color does not stat()
symlinks. However, in this case symlinks are not colored using the LINK
property.

How to reproduce:
$ eval $(dircolors -p | sed 's/^ORPHAN.*/ORPHAN 00/' | dircolors -)
$ mkdir /tmp/xxx
$ ln -s /tmp/nowhere /tmp/xxx/yyy
$ ls --color /tmp/xxx

Expected output:
yyy, colored cyan (default for LINK)

Actual output:
yyy, not colored

Fix attached. Basically, in gobble_file(), assume a symlink is ok if stat() is
not run on it.

Thanks,
M
[fix (application/octet-stream, attachment)]

This bug report was last modified 6 years and 224 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.