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

From Giles Lean
Subject Re: is_absolute_path incorrect on Windows
Date
Msg-id 20100601025828.7703.qmail@sapphire.netherstone.net
Whole thread Raw
In response to Re: is_absolute_path incorrect on Windows  (Greg Stark <gsstark@mit.edu>)
Responses Re: is_absolute_path incorrect on Windows  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
Greg Stark <gsstark@mit.edu> wrote:

> /* 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()

Um ... isn't that second function name pretty misleading, if
what you want is what the comment above it says?

Assuming the comment is what you want (presumably, else you'd
just negate a test of is_absolute_path()) then my suggestions
for (IMHO :-) clearer names would be is_subdir_path() if you
still want "path" in the name, or just is_subdir() if the
meaning will be clear enough from context.

Giles



pgsql-hackers by date:

Previous
From: Takahiro Itagaki
Date:
Subject: Re: [BUGS] BUG #5487: dblink failed with 63 bytes connection names
Next
From: Bruce Momjian
Date:
Subject: Re: is_absolute_path incorrect on Windows