JAL-1859 reinstated full path to file option (for local server)
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 18 Sep 2015 12:51:23 +0000 (13:51 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Fri, 18 Sep 2015 12:51:23 +0000 (13:51 +0100)
src/jalview/bin/JalviewLite.java

index 3d59a12..efb77e7 100644 (file)
@@ -2860,6 +2860,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.