commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ozeigerm...@apache.org
Subject svn commit: r554172 - /jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java
Date Sat, 07 Jul 2007 09:51:44 GMT
Author: ozeigermann
Date: Sat Jul  7 02:51:44 2007
New Revision: 554172

URL: http://svn.apache.org/viewvc?view=rev&rev=554172
Log:
Added patch that now deletes dangling links. 
Patch provided by Bojan Vukojevic
Details can be found here: https://issues.apache.org/jira/browse/TRANSACTION-19

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/viewvc/jakarta/commons/proper/transaction/trunk/src/java/org/apache/commons/transaction/file/FileResourceManager.java?view=diff&rev=554172&r1=554171&r2=554172
==============================================================================
--- 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
Sat Jul  7 02:51:44 2007
@@ -157,7 +157,10 @@
                             throw new IOException("Could not delete file " + removeFile.getName()
                                     + " in directory targetDir");
                         }
-                    }
+                    } else if (!targetFile.isFile()) {
+                        // this is likely a dangling link
+                        targetFile.delete();
+                    } 
                     // indicate, this has been done
                     removeFile.delete();
                 } else {



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