commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozeigerm...@apache.org
Subject svn commit: r332340 - /jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
Date Thu, 10 Nov 2005 17:59:05 GMT
Author: ozeigermann
Date: Thu Nov 10 09:58:48 2005
New Revision: 332340

URL: http://svn.apache.org/viewcvs?rev=332340&view=rev
Log:
Added check if file really is deleted. Throw an exception otherwise to indicate an error condition.

Modified:
    jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java

Modified: jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java?rev=332340&r1=332339&r2=332340&view=diff
==============================================================================
--- jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
(original)
+++ jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
Thu Nov 10 09:58:48 2005
@@ -159,7 +159,10 @@
                 File targetFile = new File(targetDir, removeFile.getName());
                 if (removeFile.isFile()) {
                     if (targetFile.exists()) {
-                        targetFile.delete();
+                        if (!targetFile.delete()) {
+                            throw new IOException("Could not delete file " + removeFile.getName()
+                                    + " in directory targetDir");
+                        }
                     }
                     // indicate, this has been done
                     removeFile.delete();



---------------------------------------------------------------------
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