ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r936720 - in /ant/core/trunk/src/main/org/apache/tools/ant: taskdefs/Move.java util/FileUtils.java
Date Thu, 22 Apr 2010 10:05:47 GMT
Author: bodewig
Date: Thu Apr 22 10:05:47 2010
New Revision: 936720

URL: http://svn.apache.org/viewvc?rev=936720&view=rev
Log:
looks as if bug 41948 was reappearing on Win7, needs further inverstigation - add some diagnostics

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=936720&r1=936719&r2=936720&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 Thu Apr 22 10:05:47 2010
@@ -338,6 +338,8 @@ public class Move extends Copy {
             destFile = getFileUtils().normalize(destFile.getAbsolutePath());
             if (destFile.equals(sourceFile)) {
                 //no point in renaming a file to its own canonical version...
+                log("Rename of " + sourceFile + " to " + destFile
+                    + " is a no-op.", Project.MSG_VERBOSE);
                 return true;
             }
             if (!(sourceFile.equals(destFile.getCanonicalFile()) || destFile.delete())) {

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=936720&r1=936719&r2=936720&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 Thu Apr 22 10:05:47 2010
@@ -1223,6 +1223,7 @@ public class FileUtils {
      * @since Ant 1.6
      */
     public void rename(File from, File to) throws IOException {
+        // identical logic lives in Move.renameFile():
         from = normalize(from.getAbsolutePath()).getCanonicalFile();
         to = normalize(to.getAbsolutePath());
         if (!from.exists()) {



Mime
View raw message