X-Git-Url: http://source.jalview.org/gitweb/?a=blobdiff_plain;f=src%2Fjalview%2Fbin%2FJalviewLite.java;h=ae84ba5332559440e5095c62dc57260e97207ca4;hb=c6c67aaa8e2d236305a3495f4edfc8cc88e22b79;hp=3d59a12a7298e4e30c1129074e8a667a8603fbf3;hpb=e411c801ba976142e207e28f196d59ab24507767;p=jalview.git diff --git a/src/jalview/bin/JalviewLite.java b/src/jalview/bin/JalviewLite.java index 3d59a12..ae84ba5 100644 --- a/src/jalview/bin/JalviewLite.java +++ b/src/jalview/bin/JalviewLite.java @@ -850,7 +850,7 @@ public class JalviewLite extends Applet implements { AlignmentI al = null; - String format = new IdentifyFile().Identify(text, + String format = new IdentifyFile().identify(text, AppletFormatAdapter.PASTE); try { @@ -1967,7 +1967,7 @@ public class JalviewLite extends Applet implements return null; } String resolvedFile = resolveFileProtocol(fileParam); - String format = new IdentifyFile().Identify(resolvedFile, protocol); + String format = new IdentifyFile().identify(resolvedFile, protocol); dbgMsg("File identified as '" + format + "'"); AlignmentI al = null; try @@ -2404,8 +2404,7 @@ public class JalviewLite extends Applet implements return rtn; } catch (Exception ex) { - System.out.println("Exception checking resources: " + f + " " - + ex); + System.out.println("Exception checking resources: " + f + " " + ex); return false; } } @@ -2860,6 +2859,15 @@ public class JalviewLite extends Applet implements URL localref) { String resolvedPath = ""; + if (targetPath.startsWith("/")) + { + String codebase = localref.toString(); + String localfile = localref.getFile(); + resolvedPath = codebase.substring(0, + codebase.length() - localfile.length()) + + targetPath; + return resolvedPath; + } /* * get URL path and strip off any trailing file e.g.