diff --git a/ChangeLog b/ChangeLog index 2622892cf7..5927aab34c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Tue Nov 22 18:36:11 2005 Hirokazu Yamamoto + + * win32/win32.c (winnt_stat): set mapped errno instead of ENOENT. + Tue Nov 22 14:36:54 2005 NAKAMURA Usaku * file.c (rb_file_s_basename): skip slashes just after UNC top slashes. diff --git a/win32/win32.c b/win32/win32.c index ceba5b71e7..07130a46a9 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -3275,7 +3275,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);