bug#10472: [PATCH] realpath: fix problems with // handling

2012-03-14 Thread Pádraig Brady
On 03/14/2012 09:53 AM, Eric Blake wrote: > On 03/14/2012 03:12 AM, Pádraig Brady wrote: >> On 03/14/2012 04:07 AM, Eric Blake wrote: >>> On 03/13/2012 09:15 PM, Eric Blake wrote: > Also doesn't path_prefix() need the same adjustment, > so as to verify --relative-base in the same way?

bug#10472: [PATCH] realpath: fix problems with // handling

2012-03-14 Thread Eric Blake
On 03/14/2012 03:12 AM, Pádraig Brady wrote: > On 03/14/2012 04:07 AM, Eric Blake wrote: >> On 03/13/2012 09:15 PM, Eric Blake wrote: Also doesn't path_prefix() need the same adjustment, so as to verify --relative-base in the same way? >>> >>> Yes, it looks like it. >> >> In fact, I found

bug#10472: [PATCH] realpath: fix problems with // handling

2012-03-14 Thread Pádraig Brady
On 03/14/2012 04:07 AM, Eric Blake wrote: > On 03/13/2012 09:15 PM, Eric Blake wrote: >>> Also doesn't path_prefix() need the same adjustment, >>> so as to verify --relative-base in the same way? >> >> Yes, it looks like it. > > In fact, I found another bug, this time present also on Linux: > > $

bug#10472: [PATCH] realpath: fix problems with // handling

2012-03-13 Thread Eric Blake
On 03/13/2012 09:15 PM, Eric Blake wrote: >> Also doesn't path_prefix() need the same adjustment, >> so as to verify --relative-base in the same way? > > Yes, it looks like it. In fact, I found another bug, this time present also on Linux: $ realpath --relative-base=/ --relative-to=/ / / when i

bug#10472: [PATCH] realpath: fix problems with // handling

2012-03-13 Thread Eric Blake
On 02/20/2012 08:21 AM, Pádraig Brady wrote: > On 02/04/2012 07:05 PM, Eric Blake wrote: >> On platforms like Cygwin where / and // are distinct, realpath was >> incorrectly collapsing // into /. http://debbugs.gnu.org/10472. >> >> This is the coreutils side of the patch; for this to work, we als

bug#10472: [PATCH] realpath: fix problems with // handling

2012-02-20 Thread Pádraig Brady
On 02/04/2012 07:05 PM, Eric Blake wrote: > On platforms like Cygwin where / and // are distinct, realpath was > incorrectly collapsing // into /. http://debbugs.gnu.org/10472. > > * src/realpath.c (path_common_prefix): When // is special, treat / > and // as having no common match. > (relpath):

bug#10472: [PATCH] realpath: fix problems with // handling

2012-02-04 Thread Eric Blake
On platforms like Cygwin where / and // are distinct, realpath was incorrectly collapsing // into /. http://debbugs.gnu.org/10472. * src/realpath.c (path_common_prefix): When // is special, treat / and // as having no common match. (relpath): Allow for no match even without --relative-base. ---