[PATCH] Don't strip two leading slashes from paths.
Wayne Davison
wayned at samba.org
Sat Nov 15 21:44:18 GMT 2008
On Sat, Nov 15, 2008 at 01:09:20PM -0800, David Rothenberger wrote:
> Unfortunately, it doesn't fully conform to the POSIX specification because
> it also translates '///' to '//' instead of '/' as required.
An easy fix for that is to change your newly added "if" to this:
if (*f == '/' && f[1] != '/')
The one thing I wonder about with this is if "//" (with nothing else)
should be interpreted as "//" or "/"? If it should collapse to "/",
we could use this:
if (*f == '/' && f[1] != '/' && f[1] != '\0')
Is there a need to use "//" for something special? I'm thinking I'll go
ahead an preserve it, just in case.
Thanks for your patch!
..wayne..
More information about the rsync
mailing list