[jboss-cvs] JBossAS SVN: r93648 - projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Sep 17 10:43:57 EDT 2009


Author: marius.bogoevici
Date: 2009-09-17 10:43:57 -0400 (Thu, 17 Sep 2009)
New Revision: 93648

Modified:
   projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java
Log:
Fixing getRelative as per JBSPRING-4

Modified: projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java
===================================================================
--- projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java	2009-09-17 14:39:07 UTC (rev 93647)
+++ projects/spring-int/trunk/vfs/src/main/java/org/jboss/spring/vfs/VFSResource.java	2009-09-17 14:43:57 UTC (rev 93648)
@@ -157,7 +157,11 @@
    @SuppressWarnings("deprecation")
    public Resource createRelative(String relativePath) throws IOException
    {
-      return new VFSResource(file.findChild(relativePath));
+      //VirtualFile.findChild will not scan the parent or current directory
+      if (relativePath.startsWith("."))
+         return new VFSResource(VFS.getRoot(new URL(getURL(), relativePath)));
+      else
+         return new VFSResource(file.findChild(relativePath));
    }
 
    public String getFilename()




More information about the jboss-cvs-commits mailing list