Skip to content
Permalink
Browse files

Use FileUtil::remove instead of std::remove

  • Loading branch information...
elileka committed May 29, 2019
1 parent cecef52 commit 8a1d1ca09204b36baaef94c5661ce72161a8f5fa
Showing with 3 additions and 7 deletions.
  1. +3 −7 src/commons/DBWriter.cpp
@@ -487,7 +487,7 @@ void DBWriter::mergeResults(const std::string &outFileName, const std::string &o
for (size_t i = 1; i < files.size(); i++) {
std::string typeFile = files[i].first + ".dbtype";
if (FileUtil::fileExists(typeFile.c_str())) {
std::remove(typeFile.c_str());
FileUtil::remove(typeFile.c_str());
}
}
}
@@ -569,9 +569,7 @@ void DBWriter::mergeResultsNormal(const char *outFileName, const char *outFileNa
Concat::concatFiles(infiles, fileCount, outFile);
for (unsigned int i = 0; i < fileCount; i++) {
fclose(infiles[i]);
if (std::remove(dataFileNames[i]) != 0) {
Debug(Debug::WARNING) << "Can not remove file " << dataFileNames[i] << "\n";
}
FileUtil::remove(dataFileNames[i]);
}
delete[] infiles;
fclose(outFile);
@@ -611,9 +609,7 @@ void DBWriter::mergeIndex(const char **indexFileNames,
writeIndex(index_file, reader.getSize(), index, reader.getSeqLens());
}
reader.close();
if (std::remove(indexFileNames[fileIdx]) != 0) {
Debug(Debug::WARNING) << "Can not remove file " << indexFileNames[fileIdx] << "\n";
}
FileUtil::remove(indexFileNames[fileIdx]);

globalOffset += threadDataFileSizes[fileIdx];
}

0 comments on commit 8a1d1ca

Please sign in to comment.
You can’t perform that action at this time.