//save end pos
filePos.push_back(size);
-
+
//sanity check filePos
for (int i = 0; i < (filePos.size()-1); i++) {
if (filePos[(i+1)] <= filePos[i]) { filePos.erase(filePos.begin()+(i+1)); i--; }
}
/***********************************************************************/
-void MothurOut::mothurRemove(string filename){
+int MothurOut::mothurRemove(string filename){
try {
filename = getFullPathName(filename);
- remove(filename.c_str());
+ int error = remove(filename.c_str());
+ //if (error != 0) {
+ // if (errno != ENOENT) { //ENOENT == file does not exist
+ // string message = "Error deleting file " + filename;
+ // perror(message.c_str());
+ // }
+ //}
+ return error;
}
catch(exception& e) {
errorOut(e, "MothurOut", "mothurRemove");