win32.c: ELOOP by _wopen
* win32/win32.c (rb_w32_wopen): map the exact error for ELOOP when EINVAL is returned by _wopen of vc runtime. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51688 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
597da7b2d0
commit
dd67521bd1
@ -5970,7 +5970,16 @@ rb_w32_wopen(const WCHAR *file, int oflag, ...)
|
|||||||
pmode = va_arg(arg, int);
|
pmode = va_arg(arg, int);
|
||||||
va_end(arg);
|
va_end(arg);
|
||||||
fd = _wopen(file, oflag, pmode);
|
fd = _wopen(file, oflag, pmode);
|
||||||
if (fd == -1 && errno == EACCES) check_if_wdir(file);
|
if (fd == -1) {
|
||||||
|
switch (errno) {
|
||||||
|
case EACCES:
|
||||||
|
check_if_wdir(file);
|
||||||
|
break;
|
||||||
|
case EINVAL:
|
||||||
|
errno = map_errno(GetLastError());
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
return fd;
|
return fd;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user