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