diff options
author | luislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-16 22:43:22 +0000 |
---|---|---|
committer | luislavena <luislavena@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-16 22:43:22 +0000 |
commit | 25058a58a290728e1bb0643145c19b283fba6db6 (patch) | |
tree | ffdf92063046d3c4171a0603d114e8196ec91793 /win32/file.c | |
parent | 7bd638b7a4062d774da7c96d3e926733b6a103ad (diff) |
skip long name conversion if last character is a wildcard one
* 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.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37692 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/file.c')
-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..1f033c646b 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 last character is a wildcard */ + if (pos[size - 1] == L'*') { + return size; + } + pos = *wfullpath + size - 1; while (!IS_DIR_SEPARATOR_P(*pos) && pos != *wfullpath) { if (!extension_len && *pos == L'.') { |