https://redmine.ruby-lang.org/https://redmine.ruby-lang.org/favicon.ico?17113305112012-12-11T19:19:53ZRuby Issue Tracking SystemBackport193 - Backport #7381: File.expand_path resolving to first file/dir instead of absolute pathhttps://redmine.ruby-lang.org/issues/7381?journal_id=346082012-12-11T19:19:53Zusa (Usaku NAKAMURA)usa@garbagecollect.jp
<ul><li><strong>Status</strong> changed from <i>Assigned</i> to <i>Closed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>This issue was solved with changeset r38321.<br>
Luis, thank you for reporting this issue.<br>
Your contribution to Ruby is greatly appreciated.<br>
May Ruby be with you.</p>
<hr>
<p>merge revision(s) 37692,37700,37706: [Backport <a class="issue tracker-4 status-5 priority-4 priority-default closed" title="Backport: File.expand_path resolving to first file/dir instead of absolute path (Closed)" href="https://redmine.ruby-lang.org/issues/7381">#7381</a>]</p>
<pre><code>* win32/file.c (replace_to_long_name): skip automatic path expansion
when wildcard character is used. <a href="/issues/7374">[ruby-core:49451]</a> [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.
<a href="/issues/7374">[ruby-core:49451]</a> [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.
<a href="/issues/7374">[ruby-core:49451]</a> [Bug #7374]
</code></pre>