modified createRelative according to David Ward's suggestion for JBSPRING-4 (SPR-5120)

This commit is contained in:
Thomas Risberg 2009-09-17 15:58:25 +00:00
parent ad4f50a0d4
commit 10c30f0315
1 changed files with 2 additions and 2 deletions

View File

@ -25,6 +25,7 @@ import java.net.URI;
import org.jboss.virtual.VirtualFile;
import org.jboss.virtual.VFSUtils;
import org.jboss.virtual.VFS;
import org.springframework.core.io.Resource;
import org.springframework.core.io.AbstractResource;
@ -115,9 +116,8 @@ class VfsResource extends AbstractResource {
}
}
@SuppressWarnings("deprecation")
public Resource createRelative(String relativePath) throws IOException {
return new VfsResource(file.findChild(relativePath));
return new VfsResource(VFS.getRoot(new URL(getURL(), relativePath)));
}
public String getFilename() {