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 | 6fff1301bdaef778b57d60a01fd23b090d248692 (patch) | |
| tree | 85eebafc3d6c7276baf0e1a8aafa944b5cb229f2 | |
| parent | f2c25bb3e4eb6c0fe738ecda954fbd740d99fc5a (diff) | |
| download | ruby-6fff1301bdaef778b57d60a01fd23b090d248692.tar.gz ruby-6fff1301bdaef778b57d60a01fd23b090d248692.tar.xz ruby-6fff1301bdaef778b57d60a01fd23b090d248692.zip | |
* win32/win32.c (winnt_stat): set mapped errno instead of ENOENT.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/branches/ruby_1_8@9588 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | win32/win32.c | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -1,3 +1,7 @@ +Tue Nov 22 18:36:11 2005 Hirokazu Yamamoto <ocean@m2.ccsnet.ne.jp> + + * win32/win32.c (winnt_stat): set mapped errno instead of ENOENT. + Tue Nov 22 14:46:57 2005 NAKAMURA Usaku <usa@ruby-lang.org> * file.c (rb_file_s_basename): skip slashes just after UNC top slashes. diff --git a/win32/win32.c b/win32/win32.c index 3be9290d9..5ec3aea4a 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); |
