JAL-629 Fixed appending URLs
[jalview.git] / src / jalview / bin / argparser / ArgValuesMap.java
index 176dc7c..63e5302 100644 (file)
@@ -193,7 +193,7 @@ public class ArgValuesMap
   }
 
   /*
-   * This method returns the basename of the first --open or --opennew value. 
+   * This method returns the basename of the first --append or --open value. 
    * Used primarily for substitutions in output filenames.
    */
   public String getBasename()
@@ -202,7 +202,7 @@ public class ArgValuesMap
   }
 
   /*
-   * This method returns the dirname of the first --open or --opennew value. 
+   * This method returns the dirname of the first --append or --open value. 
    * Used primarily for substitutions in output filenames.
    */
   public String getDirname()
@@ -213,12 +213,12 @@ public class ArgValuesMap
   public String getDirOrBasename(boolean dirname)
   {
     String filename = null;
+    String appendVal = getValue(Arg.APPEND);
     String openVal = getValue(Arg.OPEN);
-    String opennewVal = getValue(Arg.OPENNEW);
-    if (openVal != null)
+    if (appendVal != null)
+      filename = appendVal;
+    if (filename == null && openVal != null)
       filename = openVal;
-    if (filename == null && opennewVal != null)
-      filename = opennewVal;
     if (filename == null)
       return null;