mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
win32/file.c: fix drive letter
* win32/file.c (rb_file_expand_path_internal): neither the drive of base directory nor the current drive are involved in the result if different than the drive of path. [ruby-core:68130] [Bug #10858] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49640 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a8e289374a
commit
0998c2dd06
3 changed files with 9 additions and 0 deletions
|
@ -1,3 +1,10 @@
|
|||
Thu Feb 19 01:58:10 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/file.c (rb_file_expand_path_internal): neither the drive
|
||||
of base directory nor the current drive are involved in the
|
||||
result if different than the drive of path.
|
||||
[ruby-core:68130] [Bug #10858]
|
||||
|
||||
Wed Feb 18 10:48:56 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* win32/win32.c (wrename): return EXDEV if moving a directory to
|
||||
|
|
|
@ -447,6 +447,7 @@ class TestFileExhaustive < Test::Unit::TestCase
|
|||
assert_equal(@file, File.expand_path(@file + "::$DATA"))
|
||||
assert_match(/\Ac:\//i, File.expand_path('c:'), '[ruby-core:31591]')
|
||||
assert_match(/\Ac:\//i, File.expand_path('c:foo', 'd:/bar'))
|
||||
assert_match(/\Ae:\//i, File.expand_path('e:foo', 'd:/bar'))
|
||||
assert_match(%r'\Ac:/bar/foo\z'i, File.expand_path('c:foo', 'c:/bar'))
|
||||
when /darwin/
|
||||
["\u{feff}", *"\u{2000}"..."\u{2100}"].each do |c|
|
||||
|
|
|
@ -501,6 +501,7 @@ rb_file_expand_path_internal(VALUE fname, VALUE dname, int abs_mode, int long_na
|
|||
/* ignore dir since path drive is different from dir drive */
|
||||
ignore_dir = 1;
|
||||
wdir_len = 0;
|
||||
dir_drive = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue