[seam-commits] Seam SVN: r7392 - trunk/src/jbas5/org/jboss/seam/as5/vfs.

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Thu Feb 7 14:41:43 EST 2008


Author: alesj
Date: 2008-02-07 14:41:43 -0500 (Thu, 07 Feb 2008)
New Revision: 7392

Modified:
   trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java
Log:
Fix last '/' assumption #2.

Modified: trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java
===================================================================
--- trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java	2008-02-07 19:20:19 UTC (rev 7391)
+++ trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java	2008-02-07 19:41:43 UTC (rev 7392)
@@ -173,16 +173,17 @@
       {
          String rootPathName = root.getPathName();
          int rootPathNameLength = rootPathName.length();
-         // past last '/'
-         if (rootPathName.endsWith("/"))
-            rootPathNameLength++;
-
          List<VirtualFile> children = root.getChildrenRecursively();
          for (VirtualFile child : children)
          {
             if (child.isLeaf())
             {
-               getDeploymentStrategy().handle(child.getPathName().substring(rootPathNameLength));
+               String name = child.getPathName();
+               // move past '/'
+               int length = rootPathNameLength;
+               if (name.charAt(length) == '/')
+                  length++;
+               getDeploymentStrategy().handle(name.substring(length));
             }
          }
       }




More information about the seam-commits mailing list