Re: is_absolute_path incorrect on Windows
Greg Stark <gsstark@mit.edu>
From: Greg Stark <gsstark@mit.edu>
To: Magnus Hagander <magnus@hagander.net>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2010-06-01T00:50:35Z
Lists: pgsql-hackers
On Fri, Apr 9, 2010 at 2:16 PM, Magnus Hagander <magnus@hagander.net> wrote: >> I'm inclined to propose adding an additional path test operator, along >> the lines of "has_drive_specifier(path)" (always false on non-Windows), >> and use that where needed to reject relative-with-drive-letter paths. > > I think I agree with this point, but we all agreed that we should throw > the question out for the wider audience on -hackers for more comments. > If you invert the sense then it might not be so windows-specific: /* NOTE: these two functions aren't complementary under windows, * be sure to use the right one */ /* Check path always means the same thing regardless of cwd */ is_absolute_path() /* Check that path is under cwd */ is_relative_path() -- greg