commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozeigerm...@apache.org
Subject svn commit: r349997 - /jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java
Date Wed, 30 Nov 2005 17:29:32 GMT
Author: ozeigermann
Date: Wed Nov 30 09:29:27 2005
New Revision: 349997

URL: http://svn.apache.org/viewcvs?rev=349997&view=rev
Log:
Fix of previous fix :(

Modified:
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java

Modified: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java?rev=349997&r1=349996&r2=349997&view=diff
==============================================================================
--- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java
(original)
+++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/util/FileHelper.java
Wed Nov 30 09:29:27 2005
@@ -131,8 +131,11 @@
                             file.delete();
                         }
                     } else {
-                        if (targetFile.mkdirs()) {
-                            throw new IOException("Could not create target directory: "+targetFile);
+                        if (!targetFile.exists()) {
+                            if (targetFile.mkdirs()) {
+                                throw new IOException("Could not create target directory:
"
+                                        + targetFile);
+                            }
                         }
                         moveRec(file, targetFile);
                     }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message