Re: is_absolute_path incorrect on Windows - Mailing list pgsql-hackers

From Greg Stark
Subject Re: is_absolute_path incorrect on Windows
Date
Msg-id AANLkTimFLG3pOb8vvK0o-_LzSqKXUCdDduEcmnD73C-K@mail.gmail.com
Whole thread Raw
In response to is_absolute_path incorrect on Windows  (Magnus Hagander <magnus@hagander.net>)
Responses Re: is_absolute_path incorrect on Windows  (Giles Lean <giles.lean@pobox.com>)
List 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


pgsql-hackers by date:

Previous
From: Takahiro Itagaki
Date:
Subject: Re: fillfactor gets set to zero for toast tables
Next
From: Florian Pflug
Date:
Subject: Re: functional call named notation clashes with SQL feature