From: Alex Schmidt Date: Tue, 21 Aug 2012 15:18:57 +0000 (+0200) Subject: ... X-Git-Url: http://git.treefish.org/~alex/phys/latlib.git/commitdiff_plain/6b382d09f3825aca16f33e28e479b663d22e8a43?ds=inline ... --- diff --git a/writeout.cpp b/writeout.cpp index 73adfa6..0cb486c 100644 --- a/writeout.cpp +++ b/writeout.cpp @@ -26,7 +26,7 @@ writeout::writeout(const string& wdir, const string& signature, if(wdir != ""){ numprocs = procs; sprintf(cRank, "%d", rank); - fulldir = wdir + "/" + tstamp(timestamp) + "_" + signature; + fulldir = wdir + "/" + tstamp(timestamp) + "_" + signature + ".tmp"; mkdir( fulldir.c_str(), 0775); if(rank>0) of.open( (fulldir + "/rank" + cRank + ".tmp").c_str() ); @@ -69,6 +69,7 @@ writeout::~writeout() } of << "#end" << endl << flush; of.close(); + rename( fulldir.c_str(), fulldir.substr(0, fulldir.length()-4).c_str() ); } else {