X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=sharedcommand.cpp;h=2b4d56ec44591400f977e365f6501e89170c9f02;hb=643cdf74ccd4fc2d565168716fb5645917dee834;hp=d15354377efe906b7a6b10f45d6ca8dcd454a233;hpb=e51cb7e261265800fa2d2831b6516e33ebc7d78b;p=mothur.git diff --git a/sharedcommand.cpp b/sharedcommand.cpp index d153543..2b4d56e 100644 --- a/sharedcommand.cpp +++ b/sharedcommand.cpp @@ -124,7 +124,7 @@ SharedCommand::SharedCommand(string option) { //check for required parameters listfile = validParameter.validFile(parameters, "list", true); - if (listfile == "not open") { abort = true; } + if (listfile == "not open") { listfile = ""; abort = true; } else if (listfile == "not found") { listfile = m->getListFile(); if (listfile != "") { m->mothurOut("Using " + listfile + " as input file for the list parameter."); m->mothurOutEndLine(); } @@ -176,11 +176,11 @@ SharedCommand::SharedCommand(string option) { //getting output filename filename = listfile; if (outputDir == "") { outputDir += m->hasPath(filename); } - + filename = outputDir + m->getRootName(m->getSimpleName(filename)); filename = filename + "shared"; outputTypes["shared"].push_back(filename); - + m->openOutputFile(filename, out); pickedGroups = false; @@ -196,10 +196,10 @@ SharedCommand::SharedCommand(string option) { temp = new ofstream; filehandles[Groups[i]] = temp; } - + //set fileroot fileroot = outputDir + m->getRootName(m->getSimpleName(listfile)); - + //clears file before we start to write to it below for (int i=0; i