diff options
author | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-22 09:42:09 +0000 |
---|---|---|
committer | ocean <ocean@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-11-22 09:42:09 +0000 |
commit | abcbaa5c6fb2b5e5b02b255044f6ddda94a6fcd5 (patch) | |
tree | 4cca947cfe1197d654e972ef9b300b12b56af2f4 /win32/win32.c | |
parent | 333e8b294d4c7afb7a56cb4ea2b2c2820d5b17a6 (diff) |
* win32/win32.c (winnt_stat): set mapped errno instead of ENOENT.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 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); |