GNU bug report logs - #11453
`ls` in coreutils-8.17 incorrectly shows broken symlinks in /

Previous Next

Package: coreutils;

Reported by: Mike Frysinger <vapier <at> gentoo.org>

Date: Fri, 11 May 2012 18:13:01 UTC

Severity: normal

Done: Jim Meyering <jim <at> meyering.net>

Bug is archived. No further changes may be made.

Full log


Message #25 received at 11453 <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: 11453 <at> debbugs.gnu.org, jim <at> meyering.net
Subject: Re: bug#11453: `ls` in coreutils-8.17 incorrectly shows broken
	symlinks in /
Date: Mon, 14 May 2012 06:43:53 -0600
[Message part 1 (text/plain, inline)]
On 05/12/2012 08:27 AM, Jim Meyering wrote:

> Subject: [PATCH] ls: color each symlink-to-relative-name in / properly
> 
> In order for ls --color to color each symlink, it must form the name
> of each referent and then stat it to see if the link is dangling, to
> a directory, to a file, etc.  When the symlink is to a relative name,
> ls must concatenate the starting directory name and that relative name.
> When, in addition, the starting directory was "/" or "/some-name",
> the result was ill-formed, and the subsequent stat would usually fail,
> making the caller color it as a dangling symlink.

Ooh, sounds like I'd better check that cygwin properly handles symlinks
relative to / vs. // (although cygwin doesn't permit the creation of
symlinks in // proper, as that directory is a read-only representation
of other networked machines accessible at the moment).

-- 
Eric Blake   eblake <at> redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

[signature.asc (application/pgp-signature, attachment)]

This bug report was last modified 13 years and 70 days ago.

Previous Next


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