Author: bodewig Date: Tue Jun 15 10:08:49 2010 New Revision: 954785 URL: http://svn.apache.org/viewvc?rev=954785&view=rev Log: allow file names to be 'fixed in case' on Windows. PR 41948
Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java?rev=954785&r1=954784&r2=954785&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/Move.java Tue Jun 15 10:08:49 2010 @@ -349,7 +349,7 @@ public class Move extends Copy { } else if (destFile.isFile()) { sourceFile = getFileUtils().normalize(sourceFile.getAbsolutePath()).getCanonicalFile(); destFile = getFileUtils().normalize(destFile.getAbsolutePath()); - if (destFile.equals(sourceFile)) { + if (destFile.getAbsolutePath().equals(sourceFile.getAbsolutePath())) { //no point in renaming a file to its own canonical version... log("Rename of " + sourceFile + " to " + destFile + " is a no-op.", Project.MSG_VERBOSE); Modified: ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java?rev=954785&r1=954784&r2=954785&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/util/FileUtils.java Tue Jun 15 10:08:49 2010 @@ -1273,7 +1273,7 @@ public class FileUtils { System.err.println("Cannot rename nonexistent file " + from); return; } - if (from.equals(to)) { + if (from.getAbsolutePath().equals(to.getAbsolutePath())) { System.err.println("Rename of " + from + " to " + to + " is a no-op."); return; }