From 5be8ec293fa34e954c38641ca1eccc0f60c25b2d Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Thu, 27 Apr 2023 15:23:19 +0100 Subject: [PATCH] JAL-629 allow opening URL as only argument(s) --- src/jalview/bin/argparser/ArgParser.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); } -- 1.7.10.2