ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r906240 - /ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java
Date Wed, 03 Feb 2010 21:02:29 GMT
Author: maartenc
Date: Wed Feb  3 21:02:28 2010
New Revision: 906240

URL: http://svn.apache.org/viewvc?rev=906240&view=rev
Log:
Delete the invalid symlink instead of trying to overwrite it later (IVY-1165)

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java?rev=906240&r1=906239&r2=906240&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/util/FileUtil.java Wed Feb  3 21:02:28 2010
@@ -94,7 +94,7 @@
             
             // check if the result is a true symbolic link
             if (dest.getAbsolutePath().equals(dest.getCanonicalPath())) {
-                overwrite = true; // just make sure we do overwrite the invalid symlink!
+                dest.delete(); // just make sure we do delete the invalid symlink!
                 throw new IOException("error symlinking: " + dest + " isn't a symlink");

             }
         } catch (IOException x) {



Mime
View raw message