From: Ben Soares Date: Thu, 27 Apr 2023 17:36:24 +0000 (+0100) Subject: JAL-629 Fixed appending URLs X-Git-Tag: Release_2_11_4_0~365 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6dafac1b9bcc7265b0fb1641f7474a6c81b24119;p=jalview.git JAL-629 Fixed appending URLs --- diff --git a/src/jalview/bin/Commands.java b/src/jalview/bin/Commands.java index dafc342..30e71b6 100644 --- a/src/jalview/bin/Commands.java +++ b/src/jalview/bin/Commands.java @@ -214,6 +214,7 @@ public class Commands } af = afMap.get(id); + // When to open a new AlignFrame if (af == null || "true".equals(av.getSubVal("new")) || a == Arg.OPEN || format == FileFormat.Jalview) { @@ -331,7 +332,12 @@ public class Commands { Console.debug( "Opening '" + openFile + "' in existing alignment frame"); - af.getCurrentView().addFile(new File(openFile), format, false); + DataSourceType dst = HttpUtils.startsWithHttpOrHttps(openFile) + ? DataSourceType.URL + : DataSourceType.FILE; + FileLoader fileLoader = new FileLoader(!headless); + fileLoader.LoadFile(af.getCurrentView(), openFile, dst, null, + false); } Console.debug("Command " + Arg.APPEND + " executed successfully!");