You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by xa...@apache.org on 2008/06/25 18:46:11 UTC

svn commit: r671603 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java

Author: xavier
Date: Wed Jun 25 09:46:10 2008
New Revision: 671603

URL: http://svn.apache.org/viewvc?rev=671603&view=rev
Log:
make error message for copy failure when destination exists more pertinent

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java?rev=671603&r1=671602&r2=671603&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java Wed Jun 25 09:46:10 2008
@@ -73,9 +73,9 @@
         try {
             getProgressListener().setTotalLength(new Long(src.length()));
             if (!FileUtil.copy(src, destination, getProgressListener(), overwrite)) {
-                if (!overwrite) {
+                if (!overwrite && destination.exists()) {
                     throw new IOException("file copy not done from " + src + " to " + destination
-                            + ": destination probably already exists and overwrite is false");
+                            + ": destination already exists and overwrite is false");
                 } else {
                     throw new IOException("file copy not done from " + src + " to " + destination);
                 }