Commit 47388e95 authored by Petri Hintukainen's avatar Petri Hintukainen

JSM: fix getCanonPath(..."/*")

parent e13cda8b
......@@ -243,6 +243,8 @@ final class BDJSecurityManager extends SecurityManager {
private String getCanonPath(String origPath)
{
String suffix = "";
if (!java.io.BDFileSystem.isAbsolutePath(origPath)) {
String home = BDJXletContext.getCurrentXletHome();
if (home == null) {
......@@ -252,6 +254,11 @@ final class BDJSecurityManager extends SecurityManager {
origPath = home + origPath;
}
if (origPath.endsWith(File.separator + "*")) {
suffix = File.separator + "*";
origPath = origPath.substring(0, origPath.length() - 2);
}
final String path = origPath;
String cpath = (String)AccessController.doPrivileged(new PrivilegedAction() {
public Object run() {
......@@ -266,7 +273,7 @@ final class BDJSecurityManager extends SecurityManager {
if (cpath == null) {
throw new SecurityException("cant canonicalize " + path);
}
return cpath;
return cpath + suffix;
}
/*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment