Re: stat() vs ERROR_DELETE_PENDING, round N + 1
От | Juan José Santamaría Flecha |
---|---|
Тема | Re: stat() vs ERROR_DELETE_PENDING, round N + 1 |
Дата | |
Msg-id | CAC+AXB0ruMK7=WC=rXKW8eodfdp55CENdZhjEqib9u-_HqCAEA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: stat() vs ERROR_DELETE_PENDING, round N + 1 (Thomas Munro <thomas.munro@gmail.com>) |
Ответы |
Re: stat() vs ERROR_DELETE_PENDING, round N + 1
|
Список | pgsql-hackers |
On Tue, Sep 28, 2021 at 2:50 AM Thomas Munro <thomas.munro@gmail.com> wrote:
On Thu, Sep 23, 2021 at 9:13 PM Juan José Santamaría Flecha
<juanjo.santamaria@gmail.com> wrote:
> When GetTempFileName() finds a duplicated file name and the file is pending for deletion, it fails with an "ERROR_ACCESS_DENIED" error code. That may describe the situation better than "ERROR_FILE_EXISTS".
Thanks for looking. Why do you think that's better? I assume that's
just the usual NT->Win32 error conversion at work.
When a function returns an error caused by accessing a file in DELETE_PENDING you should expect an EACCES. Nonetheless, if we can emulate a POSIX behaviour by mapping it to EEXIST, that works for me. I also consider that having the logic for DELETE_PENDING in a single function is an improvement.
Regards,
Juan José Santamaría Flecha
В списке pgsql-hackers по дате отправления: