[jboss-cvs] JBossAS SVN: r74545 - projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Fri Jun 13 13:20:30 EDT 2008


Author: alesj
Date: 2008-06-13 13:20:29 -0400 (Fri, 13 Jun 2008)
New Revision: 74545

Modified:
   projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipEntryContext.java
Log:
Handle nested directories.

Modified: projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipEntryContext.java
===================================================================
--- projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipEntryContext.java	2008-06-13 16:56:37 UTC (rev 74544)
+++ projects/vfs/trunk/src/main/java/org/jboss/virtual/plugins/context/zip/ZipEntryContext.java	2008-06-13 17:20:29 UTC (rev 74545)
@@ -312,12 +312,13 @@
             if (entryName.equals(relative))
             {
                InputStream stream = new SizeLimitedInputStream(zis, entry.getSize());
-               if (JarUtils.isArchive(entryName))
+               // directories and non archives
+               if (entry.isDirectory() || JarUtils.isArchive(entryName) == false)
                {
-                  return new ZipStreamWrapper(stream, entryName, System.currentTimeMillis());
+                  return new ZipEntryWrapper(stream, entryName, System.currentTimeMillis());
                }
                else
-                  return new ZipEntryWrapper(stream, entryName, System.currentTimeMillis());
+                  return new ZipStreamWrapper(stream, entryName, System.currentTimeMillis());
             }
 
             if (longestNameMatch == null || longestNameMatch.length() < entryName.length())




More information about the jboss-cvs-commits mailing list