bug-coreutils
[Top][All Lists]
Advanced

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

bug#10472: `realpath --relative-to=<path> /` outputs inconsistent traili


From: Mike Frysinger
Subject: bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash
Date: Tue, 10 Jan 2012 15:15:57 -0500
User-agent: KMail/1.13.7 (Linux/3.2.0; KDE/4.6.5; x86_64; ; )

first some examples that look fine ...

these all output the same thing:
        realpath --relative-to=/usr /usr/bin
        realpath --relative-to=/usr/ /usr/bin
        realpath --relative-to=/usr /usr/bin/
        realpath --relative-to=/usr/ /usr/bin/
which is to say, they show:
        bin

as does these:
        realpath --relative-to=/usr/bin /usr
        realpath --relative-to=/usr/bin/ /usr
        realpath --relative-to=/usr/bin /usr/
        realpath --relative-to=/usr/bin/ /usr/
which is to say, they show:
        ..

as does these:
        realpath --relative-to=/ /usr
        realpath --relative-to=/ /usr/
which is to say, they show:
        ..

however, if the last argument is just the root path:
        realpath --relative-to=/usr /
        realpath --relative-to=/usr/ /
we end up with a trailing slash:
        ../

for consistency, i don't think that should be the case

(reported by Ulrich Müller via https://bugs.gentoo.org/398339)
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


reply via email to

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