From 6dafac1b9bcc7265b0fb1641f7474a6c81b24119 Mon Sep 17 00:00:00 2001 From: Ben Soares Date: Thu, 27 Apr 2023 18:36:24 +0100 Subject: [PATCH] JAL-629 Fixed appending URLs --- src/jalview/bin/Commands.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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!"); -- 1.7.10.2