diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-05 06:29:31 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-01-05 06:29:31 +0000 |
commit | cef30c7a417b1e4fa57369792201aa0625b5fceb (patch) | |
tree | 227bc063389e6c3b4822c656d385438ffe47b74d /win32/win32.c | |
parent | 0d8ad1a96be13d90c314774867418bbdd1719c4d (diff) |
* 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
Diffstat (limited to 'win32/win32.c')
-rw-r--r-- | win32/win32.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/win32/win32.c b/win32/win32.c index 62c3076d73..4804359794 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -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); |