[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#10472: `realpath --relative-to=<path> /` outputs inconsistent traili
From: |
Pádraig Brady |
Subject: |
bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash |
Date: |
Wed, 25 Jan 2012 16:55:09 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:6.0) Gecko/20110816 Thunderbird/6.0 |
On 01/10/2012 10:30 PM, Pádraig Brady wrote:
> On 01/10/2012 09:53 PM, Mike Frysinger wrote:
>> On Tuesday 10 January 2012 15:15:57 Mike Frysinger wrote:
>>> as does these:
>>> realpath --relative-to=/ /usr
>>> realpath --relative-to=/ /usr/
>>> which is to say, they show:
>>> ..
>>
>> sorry, typo here ... these actually output:
>> ../usr
>>
>> i guess that should be just "usr".
>> -mike
>
> Agreed. python concurs too:
>
>>>> os.path.relpath(start='/usr',path='/')
> '..'
>>>> os.path.relpath(start='/',path='/usr')
> 'usr'
>
> Essentially in these edge cases the relative paths
> printed are valid, but not canonicalised.
>
> I'll fix it up.
Proposed fix attached.
cheers,
Pádraig.
relpath-edge-cases.diff
Description: Text document
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Mike Frysinger, 2012/01/10
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Mike Frysinger, 2012/01/10
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Pádraig Brady, 2012/01/10
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Mike Frysinger, 2012/01/10
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash,
Pádraig Brady <=
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Jim Meyering, 2012/01/25
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Pádraig Brady, 2012/01/25
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Pádraig Brady, 2012/01/25
- bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Jim Meyering, 2012/01/25
bug#10472: `realpath --relative-to=<path> /` outputs inconsistent trailing slash, Eric Blake, 2012/01/30