bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#62385: POSIX behavior of readlink, realpath


From: Collin Funk
Subject: bug#62385: POSIX behavior of readlink, realpath
Date: Sat, 09 Aug 2025 18:04:44 -0700
User-agent: Gnus/5.13 (Gnus v5.13)

Collin Funk <collin.funk1@gmail.com> writes:

> PƔdraig Brady <P@draigBrady.com> writes:
>
>>> Done, v2 attached.
>>
>> Looks good.
>
> Pushed, thanks to you and Dmitry for the review.
>
> Leaving this bug open for realpath. I'll have a look at that as well,
> just requires some more reading than readlink did. :)

It looks like 'realpath -E' is the same as Coreutils 'readlink -f', and
default behavior of Coreutils 'realpath'.  POSIX us to keep our default
behavior [1]:

    If no options are specified, realpath shall canonicalize the specified
    pathname in an unspecified manner such that the resulting absolute
    pathname does not contain any components that refer to files of type
    symbolic link and does not contain any components that are dot or
    dot-dot.

Here is a proposed patch.

I don't love having 'realpath -E' and 'readlink -f' with the same long
option name, but having the same functionality with a different long
option name seems worse.

Collin

[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/realpath.html

Attachment: 0001-realpath-support-the-E-option-required-by-POSIX.patch
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]