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

seam-commits at lists.jboss.org seam-commits at lists.jboss.org
Wed Jan 23 10:34:23 EST 2008


Author: alesj
Date: 2008-01-23 10:34:23 -0500 (Wed, 23 Jan 2008)
New Revision: 7209

Modified:
   trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java
Log:
Cut root pathName.

Modified: trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java
===================================================================
--- trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java	2008-01-23 15:32:07 UTC (rev 7208)
+++ trunk/src/jbas5/org/jboss/seam/as5/vfs/VFSScanner.java	2008-01-23 15:34:23 UTC (rev 7209)
@@ -160,23 +160,25 @@
    /**
     * Handle virtual file root.
     *
-    * @param file the virtual file root
+    * @param root the virtual file root
     * @throws IOException for any error
     */
-   protected void handleRoot(VirtualFile file) throws IOException
+   protected void handleRoot(VirtualFile root) throws IOException
    {
-      if (file.isLeaf())
+      if (root.isLeaf())
       {
-         getDeploymentStrategy().handle(file.getPathName());
+         getDeploymentStrategy().handle(root.getPathName());
       }
       else
       {
-         List<VirtualFile> children = file.getChildrenRecursively();
+         String rootPathName = root.getPathName();
+         int rootPathNameLength = rootPathName.length() + 1; // past last '/'
+         List<VirtualFile> children = root.getChildrenRecursively();
          for (VirtualFile child : children)
          {
             if (child.isLeaf())
             {
-               getDeploymentStrategy().handle(child.getPathName());
+               getDeploymentStrategy().handle(child.getPathName().substring(rootPathNameLength));
             }
          }
       }




More information about the seam-commits mailing list