X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=command.hpp;fp=command.hpp;h=7ed03f161e18b9ea5bd8374606585ccefb41772e;hb=ac4d6a2ac10c8feb043aa11582a769b6093c5941;hp=2ba35ab14308ded53d6868586d8695799cbb25a0;hpb=deba0af0ccdcb6005ed5b2b82649b137c63fbdf7;p=mothur.git diff --git a/command.hpp b/command.hpp index 2ba35ab..7ed03f1 100644 --- a/command.hpp +++ b/command.hpp @@ -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 {