mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* win32/win32.c (check_valid_dir): strict checking of root.
GetDriveType() succeeds with non root directory as the argument, even if MSDN says that the API needs the root directory. this patch fixes a failure of test/ruby/test_file_exhaustive.rb. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34216 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
0d8ad1a96b
commit
cef30c7a41
2 changed files with 8 additions and 1 deletions
|
@ -1,3 +1,10 @@
|
|||
Thu Jan 5 15:26:15 2012 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (check_valid_dir): strict checking of root.
|
||||
GetDriveType() succeeds with non root directory as the argument,
|
||||
even if MSDN says that the API needs the root directory.
|
||||
this patch fixes a failure of test/ruby/test_file_exhaustive.rb.
|
||||
|
||||
Thu Jan 5 12:15:55 2012 NARUSE, Yui <naruse@ruby-lang.org>
|
||||
|
||||
* file.c (rb_file_join): separator is appended by array length - 1
|
||||
|
|
|
@ -4485,7 +4485,7 @@ check_valid_dir(const WCHAR *path)
|
|||
errno = map_errno(GetLastError());
|
||||
return -1;
|
||||
}
|
||||
if (GetDriveTypeW(full) != DRIVE_NO_ROOT_DIR)
|
||||
if (full[1] == L':' && !full[3] && GetDriveTypeW(full) != DRIVE_NO_ROOT_DIR)
|
||||
return 0;
|
||||
|
||||
fh = open_dir_handle(path, &fd);
|
||||
|
|
Loading…
Add table
Reference in a new issue