From: jabcalves@... Date: 2015-04-01T00:02:57+00:00 Subject: [ruby-core:68706] [Ruby trunk - Bug #11021] [Open] FileUtils.mv displays the wrong destination when Errno::EEXIST is raised Issue #11021 has been reported by Jo��o Britto. ---------------------------------------- Bug #11021: FileUtils.mv displays the wrong destination when Errno::EEXIST is raised https://bugs.ruby-lang.org/issues/11021 * Author: Jo��o Britto * Status: Open * Priority: Normal * Assignee: * ruby -v: ruby 2.2.1p85 (2015-02-26 revision 49769) [x86_64-darwin14] * Backport: 2.0.0: UNKNOWN, 2.1: UNKNOWN, 2.2: UNKNOWN ---------------------------------------- Suppose we have the following directory structure: ~~~ $ cd /tmp $ mkdir -p ruby/a $ mkdir ruby/a/b $ mkdir ruby/b $ tree ruby ruby ��������� a ������� ��������� b ��������� b 3 directories, 0 files ~~~ When we try to move `b` inside `a`, there is a name clash and `Errno::EEXIST` is raised. ~~~ $ irb >> require 'fileutils' => true >> FileUtils.mv 'ruby/b', 'ruby/a' Errno::EEXIST: File exists - ruby/a ~~~ However, the error message says `ruby/a exists`, which does not seem to be the proper destination. The error message should instead read `ruby/a/b exists`. I am including a patch to address this issue. ---Files-------------------------------- ruby-fileutils-mv-fix.diff (912 Bytes) -- https://bugs.ruby-lang.org/