mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (rb_w32_stat): empty path is invalid, and return
ENOENT rather than EBADF in such case. [ruby-talk:57177] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3102 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
59d4702438
commit
c405dbf692
2 changed files with 9 additions and 5 deletions
|
@ -1,3 +1,8 @@
|
|||
Sun Dec 1 22:43:29 2002 Nobuyoshi Nakada <nobu.nokada@softhome.net>
|
||||
|
||||
* win32/win32.c (rb_w32_stat): empty path is invalid, and return
|
||||
ENOENT rather than EBADF in such case. [ruby-talk:57177]
|
||||
|
||||
Thu Nov 28 12:08:30 2002 Akinori MUSHA <knu@iDaemons.org>
|
||||
|
||||
* lib/mkmf.rb: Avoid the use of "clean::" in favor of "clean:" in
|
||||
|
|
|
@ -2539,13 +2539,12 @@ rb_w32_stat(const char *path, struct stat *st)
|
|||
*s = *p;
|
||||
}
|
||||
*s = '\0';
|
||||
len = strlen(buf1);
|
||||
p = CharPrev(buf1, buf1 + len);
|
||||
if( '\"' == *(--s) )
|
||||
{
|
||||
errno = EBADF;
|
||||
len = s - buf1;
|
||||
if (!len || '\"' == *(--s)) {
|
||||
errno = ENOENT;
|
||||
return -1;
|
||||
}
|
||||
p = CharPrev(buf1, buf1 + len);
|
||||
|
||||
if (isUNCRoot(buf1)) {
|
||||
if (*p != '\\')
|
||||
|
|
Loading…
Reference in a new issue