Bruce Momjian schrieb:
The following applied patch removes duplicate slashes from the path in
canonicalize_path(). It preserve double leading slashes on Win32.
e.g. ab => /a/b
snip
*o make Win32 path use Unix slashes
*o remove trailing quote on Win32
*
Andrew Dunstan wrote:
>
>
> Bruce Momjian wrote:
>
> >*** 247,255
> > int len = strlen(path);
> >
> > if (len > 2 && strcmp(path + len - 2, "/.") == 0)
> >-{
> > trim_directory(path);
> >-}
> >
Bruce Momjian wrote:
*** 247,255
int len = strlen(path);
if (len > 2 && strcmp(path + len - 2, "/.") == 0)
- {
trim_directory(path);
- }
else if (len > 3 && strcmp(path + len - 3, "/..") == 0)
{
trim_directory(path);
As a matter of style I hate this. Stripping