From dee97314c8d002df2ec57812bf82f0460ba51dd8 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Tue, 21 May 2024 15:55:57 +0100 Subject: [PATCH] JAL-4409 Make HttpUtils.equivalentJalviewUrlString 'non-destructive' --- src/jalview/bin/Commands.java | 2 -- src/jalview/util/ArgParserUtils.java | 3 ++- src/jalview/util/HttpUtils.java | 3 ++- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index 05b987e..97ab98e 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -239,8 +239,6 @@ public class Commands String openFile0 = av.getValue(); String openFile = HttpUtils.equivalentJalviewUrl(openFile0); if (openFile == null) - openFile = openFile0; - if (openFile == null) continue; theseArgsWereParsed = true; diff --git a/src/jalview/util/ArgParserUtils.java b/src/jalview/util/ArgParserUtils.java index be0f428..fabbc76 100644 --- a/src/jalview/util/ArgParserUtils.java +++ b/src/jalview/util/ArgParserUtils.java @@ -100,7 +100,8 @@ public class ArgParserUtils continue; } filenames.add(pos + 1, a.argString()); - filenames.add(pos + 2, associatedFile); + filenames.add(pos + 2, + HttpUtils.equivalentJalviewUrl(associatedFile)); } } // add an --open arg to separate from other files diff --git a/src/jalview/util/HttpUtils.java b/src/jalview/util/HttpUtils.java index c3f32fc..04a820d 100644 --- a/src/jalview/util/HttpUtils.java +++ b/src/jalview/util/HttpUtils.java @@ -243,7 +243,8 @@ public class HttpUtils { if (!isJalviewSchemeUri(jalviewUriString)) { - return null; + // not a jalviewUriString, hand it back + return jalviewUriString; } URI jalviewUri; try -- 1.7.10.2