mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
fileutils.rb: fix error message
* lib/fileutils.rb (FileUtils#mv): show the exact target path in the error message instead of the destination parent directory name. patched by João Britto <jabcalves AT gmail.com> at [ruby-core:68706]. [Bug #11021] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c6411c6455
commit
676fe089bd
3 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
Wed Apr 1 09:59:12 2015 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* lib/fileutils.rb (FileUtils#mv): show the exact target path in
|
||||
the error message instead of the destination parent directory
|
||||
name. patched by Joao Britto <jabcalves AT gmail.com> at
|
||||
[ruby-core:68706]. [Bug #11021]
|
||||
|
||||
Tue Mar 31 15:25:07 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||
|
||||
* doc/ChangeLog-0.06_to_0.52: added archived Changelog.
|
||||
|
|
|
@ -518,7 +518,7 @@ module FileUtils
|
|||
begin
|
||||
if destent.exist?
|
||||
if destent.directory?
|
||||
raise Errno::EEXIST, dest
|
||||
raise Errno::EEXIST, d
|
||||
else
|
||||
destent.remove_file if rename_cannot_overwrite_file?
|
||||
end
|
||||
|
|
|
@ -416,7 +416,8 @@ class TestFileUtils < Test::Unit::TestCase
|
|||
|
||||
mkdir 'tmp/tmpdir'
|
||||
mkdir_p 'tmp/dest2/tmpdir'
|
||||
assert_raise(Errno::EEXIST) {
|
||||
assert_raise_with_message(Errno::EEXIST, %r' - tmp/dest2/tmpdir\z',
|
||||
'[ruby-core:68706] [Bug #11021]') {
|
||||
mv 'tmp/tmpdir', 'tmp/dest2'
|
||||
}
|
||||
mkdir 'tmp/dest2/tmpdir/junk'
|
||||
|
|
Loading…
Reference in a new issue