Re: [PATCHES] Add remove duplicate slashes to canonicalize_path()

2004-11-07 Thread Reini Urban
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 *

Re: [PATCHES] Add remove duplicate slashes to canonicalize_path()

2004-11-06 Thread Andrew Dunstan
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 the

Re: [PATCHES] Add remove duplicate slashes to canonicalize_path()

2004-11-06 Thread Bruce Momjian
Andrew Dunstan wrote: Bruce Momjian wrote: *** 247,255 int len = strlen(path); if (len 2 strcmp(path + len - 2, /.) == 0) -{ trim_directory(path); -} else if (len 3