JAL-2422 correct ChimeraX save/open session commands; check for null
[jalview.git] / src / jalview / ext / rbvi / chimera / ChimeraXCommands.java
index 90bdb6b..6df5ab9 100644 (file)
@@ -125,7 +125,8 @@ public class ChimeraXCommands extends ChimeraCommands
   public StructureCommandI saveSession(String filepath)
   {
     // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/save.html
-    return new StructureCommand("save session " + filepath);
+    // note ChimeraX will append ".cxs" to the filepath!
+    return new StructureCommand("save " + filepath + " format session");
   }
 
   /**
@@ -226,6 +227,6 @@ public class ChimeraXCommands extends ChimeraCommands
   public StructureCommandI openSession(String filepath)
   {
     // https://www.cgl.ucsf.edu/chimerax/docs/user/commands/open.html#composite
-    return new StructureCommand("open session:" + filepath);
+    return new StructureCommand("open " + filepath + " format session");
   }
 }