Re: drop tablespace failed when location contains .. on win32

Поиск
Список
Период
Сортировка
От Kyotaro Horiguchi
Тема Re: drop tablespace failed when location contains .. on win32
Дата
Msg-id 20210913.173629.689388354506122738.horikyota.ntt@gmail.com
обсуждение исходный текст
Ответ на Re: drop tablespace failed when location contains .. on win32  (Michael Paquier <michael@paquier.xyz>)
Ответы RE: drop tablespace failed when location contains .. on win32  ("wangsh.fnst@fujitsu.com" <wangsh.fnst@fujitsu.com>)
Список pgsql-hackers
At Mon, 13 Sep 2021 16:06:52 +0900, Michael Paquier <michael@paquier.xyz> wrote in 
> On Sun, Sep 12, 2021 at 07:33:23AM +0000, wangsh.fnst@fujitsu.com wrote:
> > 0001 is a small fix, because I find that is_absolute_path is not appropriate, 
> > see comment in skip_drive:
> > > * On Windows, a path may begin with "C:" or "//network/".
> 
>  #define is_absolute_path(filename) \
>  ( \
> -       IS_DIR_SEP((filename)[0]) || \
> +       (IS_DIR_SEP((filename)[0]) && IS_DIR_SEP((filename)[1])) || \
>         (isalpha((unsigned char) ((filename)[0])) && (filename)[1] == ':' && \
>          IS_DIR_SEP((filename)[2])) \
> With this change you would consider a path beginning with "/foo/.." as
> not being an absolute path, but that's not correct.  Or am I missing
>  something obvious?

Mmm. I haven't thought that so seriously, but '/hoge/foo/bar' doesn't
seem to be an absolute path on Windows since it lacks
"<dirver-letter>:" or "//hostname" part.  If we're on drive D:,
"/Program\ Files" doesn't mean "C:\Program\ Files" but "D:\Program\
Files".

regards.

-- 
Kyotaro Horiguchi
NTT Open Source Software Center



В списке pgsql-hackers по дате отправления:

Предыдущее
От: gkokolatos@pm.me
Дата:
Сообщение: Re: Teach pg_receivewal to use lz4 compression
Следующее
От: Etsuro Fujita
Дата:
Сообщение: Re: Doc: Extra type info on postgres-fdw option import_generated in back branches