JAL-3750 parse protocol before checking if argument to -open can be opened as a file
authorJim Procter <jprocter@issues.jalview.org>
Thu, 17 Sep 2020 11:09:42 +0000 (12:09 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Thu, 17 Sep 2020 11:09:42 +0000 (12:09 +0100)
src/jalview/bin/Jalview.java

index 341bcba..613cc02 100755 (executable)
@@ -451,7 +451,11 @@ public class Jalview
       }
       System.out.println("CMD [-open " + file + "] executed successfully!");
 
-      if (!file.startsWith("http://"))
+      
+
+      protocol = AppletFormatAdapter.checkProtocol(file);
+      
+      if (protocol == DataSourceType.FILE)
       {
         if (!(new File(file)).exists())
         {
@@ -463,8 +467,6 @@ public class Jalview
         }
       }
 
-      protocol = AppletFormatAdapter.checkProtocol(file);
-
       try
       {
         format = new IdentifyFile().identify(file, protocol);