in >> first >> second >> dist; m->gobble(in);
- if (m->control_pressed) { in.close(); out.close(); remove(tempDistFile.c_str()); return 0; }
+ if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(tempDistFile); return 0; }
//while there are still values in mergedMin that are smaller than the distance read from file
while (count < mergedMin.size()) {
mergedMin.clear();
//rename tempfile to distfile
- remove(distfile.c_str());
+ m->mothurRemove(distfile);
rename(tempDistFile.c_str(), distfile.c_str());
//cout << "remove = "<< renameOK << " rename = " << ok << endl;
exit(1);
}
}
-/***********************************************************************/
+***********************************************************************/
int HCluster::processFile() {
try {
string firstName, secondName;
//get entry
while (!in.eof()) {
- if (m->control_pressed) { in.close(); out.close(); remove(outTemp.c_str()); return 0; }
+ if (m->control_pressed) { in.close(); out.close(); m->mothurRemove(outTemp); return 0; }
in >> firstName >> secondName >> distance; m->gobble(in);
in.close();
out.close();
- remove(distfile.c_str());
+ m->mothurRemove(distfile);
rename(outTemp.c_str(), distfile.c_str());
return 0;