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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to