1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
ocean 2005-11-22 09:42:09 +00:00
parent 333e8b294d
commit abcbaa5c6f
2 changed files with 5 additions and 1 deletions

View file

@ -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:36:54 2005 NAKAMURA Usaku <usa@ruby-lang.org>
* file.c (rb_file_s_basename): skip slashes just after UNC top slashes.

View file

@ -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);