X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=degapseqscommand.cpp;h=1d83f3bef00d08574a66d7e5ecf21efa148452a4;hb=c92fb04685fb818b0c742bc344806c6c04ef6af2;hp=940672c1bef7f6ab2004a9b374011cd1f8420e85;hpb=e150b0b0664caec517485ee6d69dcdade6dcae77;p=mothur.git diff --git a/degapseqscommand.cpp b/degapseqscommand.cpp index 940672c..1d83f3b 100644 --- a/degapseqscommand.cpp +++ b/degapseqscommand.cpp @@ -156,7 +156,7 @@ DegapSeqsCommand::DegapSeqsCommand(string option) { //erase from file list fastaFileNames.erase(fastaFileNames.begin()+i); i--; - } + }else { m->setFastaFile(fastaFileNames[i]); } } } @@ -197,7 +197,7 @@ int DegapSeqsCommand::execute(){ m->openOutputFile(degapFile, outFASTA); while(!inFASTA.eof()){ - if (m->control_pressed) { outputTypes.clear(); inFASTA.close(); outFASTA.close(); remove(degapFile.c_str()); for (int j = 0; j < outputNames.size(); j++) { remove(outputNames[j].c_str()); } return 0; } + if (m->control_pressed) { outputTypes.clear(); inFASTA.close(); outFASTA.close(); m->mothurRemove(degapFile); for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]); } return 0; } Sequence currSeq(inFASTA); m->gobble(inFASTA); if (currSeq.getName() != "") { @@ -210,7 +210,7 @@ int DegapSeqsCommand::execute(){ outputNames.push_back(degapFile); outputTypes["fasta"].push_back(degapFile); - if (m->control_pressed) { outputTypes.clear(); remove(degapFile.c_str()); for (int j = 0; j < outputNames.size(); j++) { remove(outputNames[j].c_str()); } return 0; } + if (m->control_pressed) { outputTypes.clear(); m->mothurRemove(degapFile); for (int j = 0; j < outputNames.size(); j++) { m->mothurRemove(outputNames[j]); } return 0; } } //set fasta file as new current fastafile