Fix issue with URI decoding.
git-svn-id: file:///home/svn/framework3/trunk@13717 4d416f70-5f16-0410-b530-b9f4589650daunstable
parent
b7ed699abf
commit
adcc9fcbbb
Binary file not shown.
|
@ -260,11 +260,15 @@ public class MsfguiApp extends SingleFrameApplication {
|
||||||
* @throws MsfException if this jar file has been moved or the containing directory structure has been moved.
|
* @throws MsfException if this jar file has been moved or the containing directory structure has been moved.
|
||||||
*/
|
*/
|
||||||
public static File getMsfRoot() throws MsfException{
|
public static File getMsfRoot() throws MsfException{
|
||||||
File f = new File(MsfguiApp.class.getProtectionDomain().getCodeSource().getLocation().getPath());
|
try{
|
||||||
File parent = f.getParentFile();
|
File f = new File(MsfguiApp.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath());
|
||||||
File grandparent = parent.getParentFile();
|
File parent = f.getParentFile();
|
||||||
if(f.getName().equals("msfgui.jar") && parent.getName().equals("gui") && grandparent.getName().equals("data"))
|
File grandparent = parent.getParentFile();
|
||||||
return grandparent.getParentFile();
|
if(f.getName().equals("msfgui.jar") && parent.getName().equals("gui") && grandparent.getName().equals("data"))
|
||||||
|
return grandparent.getParentFile();
|
||||||
|
}catch(java.net.URISyntaxException urisex){
|
||||||
|
urisex.printStackTrace();
|
||||||
|
}
|
||||||
throw new MsfException("Cannot find path.");
|
throw new MsfException("Cannot find path.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue