GNU bug report logs - #13464
Readlink Bug - Displays absolute path of a non existent file also

Previous Next

Package: coreutils;

Reported by: PK <prassanakalyan <at> gmail.com>

Date: Wed, 16 Jan 2013 18:08:02 UTC

Severity: normal

Tags: notabug

Done: Eric Blake <eblake <at> redhat.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 13464 in the body.
You can then email your comments to 13464 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-coreutils <at> gnu.org:
bug#13464; Package coreutils. (Wed, 16 Jan 2013 18:08:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to PK <prassanakalyan <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-coreutils <at> gnu.org. (Wed, 16 Jan 2013 18:08:02 GMT) Full text and rfc822 format available.

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

From: PK <prassanakalyan <at> gmail.com>
To: bug-coreutils <at> gnu.org
Subject: Readlink Bug - Displays absolute path of a non existent file also
Date: Wed, 16 Jan 2013 12:05:26 -0600
[Message part 1 (text/plain, inline)]
Hi,
readlink -m <file> displays the absolute path of a <file>

The bug is that it displays, even if the file is non-existent.

This does not solve the purpose and I see it creates more ambiguity in
showing a non-existent file.

thanks,
PK
[Message part 2 (text/html, inline)]

Added tag(s) notabug. Request was from Eric Blake <eblake <at> redhat.com> to control <at> debbugs.gnu.org. (Wed, 16 Jan 2013 21:45:02 GMT) Full text and rfc822 format available.

Reply sent to Eric Blake <eblake <at> redhat.com>:
You have taken responsibility. (Wed, 16 Jan 2013 21:45:02 GMT) Full text and rfc822 format available.

Notification sent to PK <prassanakalyan <at> gmail.com>:
bug acknowledged by developer. (Wed, 16 Jan 2013 21:45:02 GMT) Full text and rfc822 format available.

Message #12 received at 13464-done <at> debbugs.gnu.org (full text, mbox):

From: Eric Blake <eblake <at> redhat.com>
To: PK <prassanakalyan <at> gmail.com>
Cc: 13464-done <at> debbugs.gnu.org
Subject: Re: bug#13464: Readlink Bug - Displays absolute path of a non existent
	file also
Date: Wed, 16 Jan 2013 14:44:04 -0700
[Message part 1 (text/plain, inline)]
tag 13464 notabug
thanks

On 01/16/2013 11:05 AM, PK wrote:
> Hi,
> readlink -m <file> displays the absolute path of a <file>
> 
> The bug is that it displays, even if the file is non-existent.

But that is what -m (--canonicalize-missing) is _documented_ to do.  If
you want to fail for missing files, use -e (--canonicalize-existing); if
you want to probe whether a file name can be created (that is, the
directory portion exists), use -f (--canonicalize).

> 
> This does not solve the purpose and I see it creates more ambiguity in
> showing a non-existent file.

Sorry, but I don't see this as a bug, but a feature - the fact that we
have three different options with three different levels of existence
checks was intentional.  I'm closing this bug, but you can feel free to
add further comments or questions.

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

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

Information forwarded to bug-coreutils <at> gnu.org:
bug#13464; Package coreutils. (Wed, 16 Jan 2013 21:48:01 GMT) Full text and rfc822 format available.

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

From: Pádraig Brady <P <at> draigBrady.com>
To: PK <prassanakalyan <at> gmail.com>
Cc: 13464 <at> debbugs.gnu.org
Subject: Re: bug#13464: Readlink Bug - Displays absolute path of a non existent
	file also
Date: Wed, 16 Jan 2013 21:46:28 +0000
tag 13464 notabug
close 13464
stop

On 01/16/2013 06:05 PM, PK wrote:
> Hi,
> readlink -m <file> displays the absolute path of a <file>
>
> The bug is that it displays, even if the file is non-existent.
>
> This does not solve the purpose and I see it creates more ambiguity in
> showing a non-existent file.

$ readlink -m /canonicalize/blah/../a/path
/canonicalize/a/path




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 14 Feb 2013 12:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 12 years and 186 days ago.

Previous Next


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