X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=fileoutput.cpp;fp=fileoutput.cpp;h=004ed8313511c2dd42d4b87aca93c0ad5750bce5;hp=597a05a6ad9a892caff5f0b6f69269ae6af4013d;hb=71b2121662daae3f9044252887d1c16eeddd85bb;hpb=5a9f3cce3e2e053c249e3e97507ce180f0854d76 diff --git a/fileoutput.cpp b/fileoutput.cpp index 597a05a..004ed83 100644 --- a/fileoutput.cpp +++ b/fileoutput.cpp @@ -82,8 +82,10 @@ void ThreeColumnFile::resetFile(){ renameOk = rename(outName.c_str(), inName.c_str()); //checks to make sure user was able to rename and remove successfully - if ((renameOk != 0)) { mothurOut("Unable to rename necessary files."); mothurOutEndLine(); } - + if ((renameOk != 0)) { + mothurOut("Unable to rename " + outName); mothurOutEndLine(); + perror(" : "); + } } catch(exception& e) { errorOut(e, "ThreeColumnFile", "resetFile"); @@ -182,8 +184,10 @@ void ColumnFile::resetFile(){ renameOk = rename(outName.c_str(), inName.c_str()); //checks to make sure user was able to rename and remove successfully - if ((renameOk != 0)) { mothurOut("Unable to rename necessary files."); mothurOutEndLine(); } - + if ((renameOk != 0)) { + mothurOut("Unable to rename " + outName); mothurOutEndLine(); + perror(" : "); + } } catch(exception& e) { errorOut(e, "ColumnFile", "resetFile"); @@ -265,8 +269,10 @@ void SharedThreeColumnFile::resetFile(){ renameOk = rename(outName.c_str(), inName.c_str()); //checks to make sure user was able to rename and remove successfully - if ((renameOk != 0)) { mothurOut("Unable to rename necessary files."); mothurOutEndLine(); } - + if ((renameOk != 0)) { + mothurOut("Unable to rename " + outName); mothurOutEndLine(); + perror(" : "); + } } catch(exception& e) { errorOut(e, "SharedThreeColumnFile", "resetFile"); @@ -348,8 +354,10 @@ void OneColumnFile::resetFile(){ renameOk = rename(outName.c_str(), inName.c_str()); //checks to make sure user was able to rename and remove successfully - if ((renameOk != 0)) { mothurOut("Unable to rename necessary files."); mothurOutEndLine(); } - + if ((renameOk != 0)) { + mothurOut("Unable to rename " + outName); mothurOutEndLine(); + perror(" : "); + } } catch(exception& e) { errorOut(e, "OneColumnFile", "resetFile"); @@ -435,14 +443,16 @@ void SharedOneColumnFile::resetFile(){ outFile.close(); } counter = 1; - + remove(inName.c_str()); + renameOk = rename(outName.c_str(), inName.c_str()); //checks to make sure user was able to rename and remove successfully - if ((renameOk != 0)) { mothurOut("Unable to rename necessary files."); mothurOutEndLine(); } - - + if ((renameOk != 0)) { + mothurOut("Unable to rename " + outName); mothurOutEndLine(); + perror(" : "); + } } catch(exception& e) { errorOut(e, "SharedOneColumnFile", "resetFile");