diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-11 10:19:51 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-11 10:19:51 +0000 |
commit | 51f64b032a93d9521962e0ea11fa77536c8df602 (patch) | |
tree | c76840149834c910357895d737fee181c4388413 /win32 | |
parent | 4701a70b31fdb07f560822d79b1d1f0742a82afb (diff) |
merge revision(s) 37692,37700,37706: [Backport #7381]
* win32/file.c (replace_to_long_name): skip automatic path expansion
when wildcard character is used. [ruby-core:49451] [Bug #7374]
* test/ruby/test_file_exhaustive.rb: add a test for above.
* win32/file.c (replace_to_long_name): skip expansion for all wildcard
characters.
[ruby-core:49451] [Bug #7374]
* test/ruby/test_file_exhaustive.rb: add more assertions to test.
* win32/file.c (replace_to_long_name): correct logic around wildcard
characters detection and ensure wide-chars are used as pattern.
[ruby-core:49451] [Bug #7374]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@38321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32')
-rw-r--r-- | win32/file.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/win32/file.c b/win32/file.c index e3b50b450f..dfe122480f 100644 --- a/win32/file.c +++ b/win32/file.c @@ -276,6 +276,11 @@ replace_to_long_name(wchar_t **wfullpath, size_t size, int heap) return size; } + /* skip long name conversion if path contains wildcard characters */ + if (wcspbrk(pos, L"*?")) { + return size; + } + pos = *wfullpath + size - 1; while (!IS_DIR_SEPARATOR_P(*pos) && pos != *wfullpath) { if (!extension_len && *pos == L'.') { |