X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=mergefilecommand.cpp;h=a076281035ff08fdb2ba0af591dce24f726cd636;hb=6e81846c8e5b2614f6b06643a9f558fb0e6669fa;hp=7e17b051305014e2aa58831fddfabaad63f319d4;hpb=74844a60d80c6dd06e3fb02ee9b928424f9019b0;p=mothur.git diff --git a/mergefilecommand.cpp b/mergefilecommand.cpp index 7e17b05..a076281 100644 --- a/mergefilecommand.cpp +++ b/mergefilecommand.cpp @@ -97,6 +97,8 @@ int MergeFileCommand::execute(){ openInputFile(fileNames[i], inputFile); while(!inputFile.eof()){ + if (m->control_pressed) { inputFile.close(); outputFile.close(); remove(outputFileName.c_str()); return 0; } + c = inputFile.get(); //-1 is eof char if (int(c) != -1) { outputFile << c; } @@ -107,6 +109,8 @@ int MergeFileCommand::execute(){ outputFile.close(); + if (m->control_pressed) { remove(outputFileName.c_str()); return 0; } + m->mothurOutEndLine(); m->mothurOut("Output File Name: "); m->mothurOutEndLine(); m->mothurOut(outputFileName); m->mothurOutEndLine();