From 4d4c1c97b3e05fc15c7ebac8d5237ad1b8844230 Mon Sep 17 00:00:00 2001 From: Alex Schmidt Date: Mon, 9 Jul 2012 17:21:38 +0200 Subject: [PATCH 1/1] ... --- writeout.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/writeout.cpp b/writeout.cpp index 4fb68e1..eb14309 100644 --- a/writeout.cpp +++ b/writeout.cpp @@ -55,14 +55,13 @@ writeout::~writeout() cerr << "collecting " << nextfile << endl; ifstream myfile( (fulldir + "/" + nextfile).c_str() ); - while(myfile.good()){ + while(true){ string line; getline(myfile, line); - of << line << flush; + if( !myfile.good() ) break; + of << line << endl << flush; } myfile.close(); - of << endl << flush; - remove( (fulldir + "/" + nextfile).c_str() ); jobsdone++; } -- 2.39.5