X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=hcluster.cpp;fp=hcluster.cpp;h=f0514655a35212215a49fbdb7b1c14c5a3415352;hb=19fcbbdba99658f5eca244803280f9ee7f9f6607;hp=e6e97fa9144f4ab4b79c35480e1c57b0235d733f;hpb=65b6a38d00b3a72021611211e7c25392022c69ed;p=mothur.git diff --git a/hcluster.cpp b/hcluster.cpp index e6e97fa..f051465 100644 --- a/hcluster.cpp +++ b/hcluster.cpp @@ -551,7 +551,7 @@ int HCluster::combineFile() { 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()) { @@ -630,7 +630,7 @@ int HCluster::combineFile() { 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; @@ -767,7 +767,7 @@ int HCluster::processFile() { //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); @@ -787,7 +787,7 @@ int HCluster::processFile() { in.close(); out.close(); - remove(distfile.c_str()); + m->mothurRemove(distfile); rename(outTemp.c_str(), distfile.c_str()); return 0;