[jboss-cvs] JBossAS SVN: r93615 - projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/zip.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 16 11:20:51 EDT 2009
Author: alesj
Date: 2009-09-16 11:20:50 -0400 (Wed, 16 Sep 2009)
New Revision: 93615
Modified:
projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileWrapper.java
Log:
Trace deletion.
Modified: projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileWrapper.java
===================================================================
--- projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileWrapper.java 2009-09-16 15:04:58 UTC (rev 93614)
+++ projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/zip/ZipFileWrapper.java 2009-09-16 15:20:50 UTC (rev 93615)
@@ -286,19 +286,38 @@
}
if (autoClean)
- file.delete();
+ traceDelete(file);
}
+ /**
+ * Delete file.
+ *
+ * @param wrapper the wrapper
+ * @throws IOException for any error
+ */
void deleteFile(ZipFileWrapper wrapper) throws IOException
{
if (file.equals(wrapper.file))
{
closeZipFile();
- file.delete();
+ traceDelete(file);
}
}
/**
+ * Trace file deletion.
+ *
+ * @param ref the file ref
+ */
+ private static void traceDelete(File ref)
+ {
+ if (ref.delete() == false && log.isTraceEnabled())
+ {
+ log.trace("Failed to delete file: " + ref);
+ }
+ }
+
+ /**
* Delete the archive
*
* @param gracePeriod max time to wait for any locks
More information about the jboss-cvs-commits
mailing list