Backport #7381

File.expand_path resolving to first file/dir instead of absolute path

Added by Luis Lavena over 1 year ago. Updated over 1 year ago.

[ruby-core:49495]
Status:Closed
Priority:High
Assignee:Usaku NAKAMURA

Description

Please backport r37692, r37700 and r37706 as they solve Bug #7374 already fixed in trunk.

Find attached a diff containing all the changes including ChangeLog ones.

Thank you.


Related issues

Related to ruby-trunk - Bug #7374: File.expand_path resolving to first file/dir instead of a... Closed 11/17/2012

Associated revisions

Revision 38321
Added by Usaku NAKAMURA over 1 year ago

merge revision(s) 37692,37700,37706: [Backport #7381]

* win32/file.c (replace_to_long_name): skip automatic path expansion
  when wildcard character is used.   [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.
   [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.
   [Bug #7374]

History

#1 Updated by Usaku NAKAMURA over 1 year ago

  • Status changed from Assigned to Closed
  • % Done changed from 0 to 100

This issue was solved with changeset r38321.
Luis, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.


merge revision(s) 37692,37700,37706: [Backport #7381]

* win32/file.c (replace_to_long_name): skip automatic path expansion
  when wildcard character is used.   [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.
   [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.
   [Bug #7374]

Also available in: Atom PDF