Re: Function to do runtime relative directory

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: PostgreSQL Win32 port list <pgsql-hackers-win32(at)postgresql(dot)org>, PostgreSQL-patches <pgsql-patches(at)postgresql(dot)org>
Subject: Re: Function to do runtime relative directory
Date: 2004-05-04 18:41:32
Message-ID: 200405041841.i44IfWA11908@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

Andrew Dunstan wrote:
> Bruce Momjian wrote:
>
> >+ if (toupper(*src) != toupper(*src))
> >
> >
>
> Shouldn't this be
>
> if (toupper(*src) != toupper(*dst))
>
> ?
>

Yep, fixed.

> For completeness, you should probably also check for network
> drive paths ("\\machine\sharename\foo").

Oh, OK.

>
> I also think we should just canonicalise everything early, and
> then never have to worry about / vs \ again.
>
> I must confess I think this scheme is overkill - I can't think
> of a use case where one would want a relocatable installation
> which would any pattern other than the one we are thinking of
> for the windows binary installer. Are we taking flexibility too
> far?

This code might be used on Unix too.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2004-05-04 19:00:15 Re: Function to do runtime relative directory
Previous Message Andrew Dunstan 2004-05-04 18:31:27 Re: Function to do runtime relative directory

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Andrew Dunstan 2004-05-04 19:00:15 Re: Function to do runtime relative directory
Previous Message Andrew Dunstan 2004-05-04 18:31:27 Re: Function to do runtime relative directory

Browse pgsql-patches by date

  From Date Subject
Next Message Andrew Dunstan 2004-05-04 19:00:15 Re: Function to do runtime relative directory
Previous Message Andrew Dunstan 2004-05-04 18:31:27 Re: Function to do runtime relative directory