* 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:
parent
333e8b294d
commit
abcbaa5c6f
@ -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>
|
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.
|
* file.c (rb_file_s_basename): skip slashes just after UNC top slashes.
|
||||||
|
@ -3275,7 +3275,7 @@ winnt_stat(const char *path, struct stat *st)
|
|||||||
// Because GetDriveType returns 1 for network shares. (Win98 returns 4)
|
// Because GetDriveType returns 1 for network shares. (Win98 returns 4)
|
||||||
DWORD attr = GetFileAttributes(path);
|
DWORD attr = GetFileAttributes(path);
|
||||||
if (attr == -1) {
|
if (attr == -1) {
|
||||||
errno = ENOENT;
|
errno = map_errno(GetLastError());
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
st->st_mode = fileattr_to_unixmode(attr, path);
|
st->st_mode = fileattr_to_unixmode(attr, path);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user