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++;
}