From: Ben Soares Date: Tue, 21 May 2024 14:55:57 +0000 (+0100) Subject: JAL-4409 Make HttpUtils.equivalentJalviewUrlString 'non-destructive' X-Git-Tag: Release_2_11_4_0~28^2~13 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=dee97314c8d002df2ec57812bf82f0460ba51dd8;p=jalview.git JAL-4409 Make HttpUtils.equivalentJalviewUrlString 'non-destructive' --- 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