Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfcd1132

Browse files
committed
Minor cleanup for win32stat.c.
Use GetLastError(), rather than assuming that CreateFile() failuremust map to ENOENT. Noted by Michael Paquier.Discussion:https://postgr.es/m/CAC+AXB0g44SbvSpC86o_1HWh8TAU2pZrMRW6tJT-dkijotx5Qg@mail.gmail.com
1 parente578c17 commitfcd1132

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

‎src/port/win32stat.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,8 +204,10 @@ _pgstat64(const char *name, struct stat *buf)
204204
NULL);
205205
if (hFile==INVALID_HANDLE_VALUE)
206206
{
207+
DWORDerr=GetLastError();
208+
207209
CloseHandle(hFile);
208-
errno=ENOENT;
210+
_dosmaperr(err);
209211
return-1;
210212
}
211213

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp