Skip site navigation (1) Skip section navigation (2)

Re: is_absolute_path incorrect on Windows

From: Giles Lean <giles(dot)lean(at)pobox(dot)com>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: is_absolute_path incorrect on Windows
Date: 2010-06-01 02:58:28
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Greg Stark <gsstark(at)mit(dot)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.


In response to


pgsql-hackers by date

Next:From: Bruce MomjianDate: 2010-06-01 03:02:21
Subject: Re: is_absolute_path incorrect on Windows
Previous:From: Takahiro ItagakiDate: 2010-06-01 02:55:11
Subject: Re: BUG #5487: dblink failed with 63 bytes connection names

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group