diff options
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index 3be9290d9f..5ec3aea4af 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2918,7 +2918,7 @@ winnt_stat(const char *path, struct stat *st) // Because GetDriveType returns 1 for network shares. (Win98 returns 4) DWORD attr = GetFileAttributes(path); if (attr == -1) { - errno = ENOENT; + errno = map_errno(GetLastError()); return -1; } st->st_mode = fileattr_to_unixmode(attr, path); |