From: Ben Soares Date: Thu, 27 Apr 2023 14:23:19 +0000 (+0100) Subject: JAL-629 allow opening URL as only argument(s) X-Git-Tag: Release_2_11_4_0~367 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=5be8ec293fa34e954c38641ca1eccc0f60c25b2d;p=jalview.git JAL-629 allow opening URL as only argument(s) --- diff --git a/src/jalview/bin/argparser/ArgParser.java b/src/jalview/bin/argparser/ArgParser.java index 0ab5987..d5e3bff 100644 --- a/src/jalview/bin/argparser/ArgParser.java +++ b/src/jalview/bin/argparser/ArgParser.java @@ -37,6 +37,7 @@ import jalview.bin.Console; import jalview.bin.Jalview; import jalview.bin.argparser.Arg.Opt; import jalview.util.FileUtils; +import jalview.util.HttpUtils; public class ArgParser { @@ -197,7 +198,8 @@ public class ArgParser // single arg[i] and increment the defaultLinkedIdCounter so that each of // these files is opened separately. if (openEachInitialFilenames && !arg.startsWith(DOUBLEDASH) - && !arg.startsWith("-") && new File(arg).exists()) + && !arg.startsWith("-") && (new File(arg).exists() + || HttpUtils.startsWithHttpOrHttps(arg))) { arg = Arg.OPEN.argString(); }