mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (rb_w32_opendir): need to set errno. [ruby-talk:73761]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f7afa61a0a
commit
77e941269f
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
|||
Tue Jun 17 21:28:27 2003 Ariff Abdullah <skywizard@time.net.my>
|
||||
|
||||
* win32/win32.c (rb_w32_opendir): need to set errno. [ruby-talk:73761]
|
||||
|
||||
Mon Jun 16 19:01:25 2003 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c: remove rb_cBlock.
|
||||
|
|
|
@ -1333,7 +1333,9 @@ rb_w32_opendir(const char *filename)
|
|||
// check to see if we've got a directory
|
||||
//
|
||||
|
||||
if ((rb_w32_stat(filename, &sbuf) < 0 || (
|
||||
if (rb_w32_stat(filename, &sbuf) < 0)
|
||||
return NULL;
|
||||
if (((
|
||||
#ifdef __BORLANDC__
|
||||
(unsigned short)(sbuf.st_mode)
|
||||
#else
|
||||
|
@ -1342,6 +1344,7 @@ rb_w32_opendir(const char *filename)
|
|||
& _S_IFDIR) == 0) &&
|
||||
(!ISALPHA(filename[0]) || filename[1] != ':' || filename[2] != '\0' ||
|
||||
((1 << (filename[0] & 0x5f) - 'A') & GetLogicalDrives()) == 0)) {
|
||||
errno = ENOTDIR;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue