ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xav...@apache.org
Subject svn commit: r671603 - /ant/ivy/core/trunk/src/java/org/apache/ivy/plugins/repository/file/FileRepository.java
Date Wed, 25 Jun 2008 16:46:11 GMT
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);
                 }



Mime
View raw message