]> git.donarmstrong.com Git - mothur.git/blobdiff - command.hpp
fixed outputName creator, added debugging to readblast
[mothur.git] / command.hpp
index 2ba35ab14308ded53d6868586d8695799cbb25a0..7ed03f161e18b9ea5bd8374606585ccefb41772e 100644 (file)
@@ -74,8 +74,13 @@ class Command {
                                         m->mothurOut("[ERROR]: Did not provide variable for " + pieces[i] + ".\n"); m->control_pressed = true;
                                     }else {
                                         if (it->second != "") {
-                                            if (it->first != "[filename]") { filename += it->second + "."; }
-                                            else { filename += it->second; }
+                                            if (it->first == "[filename]") { filename += it->second; }
+                                            else if (it->first == "[extension]") { 
+                                                if (filename.length() > 0) { //rip off last "."
+                                                    filename = filename.substr(0, filename.length()-1);
+                                                }
+                                                filename += it->second + "."; 
+                                            }else { filename += it->second + "."; }
                                         }
                                     }
                                 }else {