[jboss-cvs] JBossAS SVN: r93974 - projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/file.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Sep 24 02:59:30 EDT 2009
Author: alesj
Date: 2009-09-24 02:59:29 -0400 (Thu, 24 Sep 2009)
New Revision: 93974
Modified:
projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java
Log:
Minor delete bug.
Modified: projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java
===================================================================
--- projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java 2009-09-24 03:47:09 UTC (rev 93973)
+++ projects/vfs/branches/Branch_2_1/src/main/java/org/jboss/virtual/plugins/context/file/FileHandler.java 2009-09-24 06:59:29 UTC (rev 93974)
@@ -46,6 +46,7 @@
*
* @author <a href="adrian at jboss.com">Adrian Brock</a>
* @author Scott.Stark at jboss.org
+ * @author <a href="ales.justin at jboss.org">Ales Justin</a>
* @author <a href="strukelj at parsek.net">Marko Strukelj</a>
* @version $Revision: 1.1 $
*/
@@ -193,7 +194,10 @@
boolean done = Files.delete(f);
if (done)
{
- childCache.remove(f.getName());
+ VirtualFileHandler parent = getParent();
+ if (parent != null)
+ parent.removeChild(f.getName());
+
return true;
}
@@ -212,7 +216,10 @@
}
else
{
- childCache.remove(f.getName());
+ VirtualFileHandler parent = getParent();
+ if (parent != null)
+ parent.removeChild(f.getName());
+
return true;
}
}
@@ -241,7 +248,7 @@
Map<String, VirtualFileHandler> oldCache = childCache;
// fill up a new cache with old entries
// old entries no longer existing in directory are purged by not being added to new cache
- // we cache handlers so that things like JARs are recreated (optimization)
+ // we cache handlers so that things like JARs are not recreated (optimization)
for (File file : files)
{
try
More information about the jboss-cvs-commits
mailing list