From: bangerth Date: Sun, 11 Sep 2011 17:56:41 +0000 (+0000) Subject: Delete temporary file after concatenating it to deallog. X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a57f2238795924aab6442aa5fa4c197b5da706f;p=dealii-svn.git Delete temporary file after concatenating it to deallog. git-svn-id: https://svn.dealii.org/trunk@24305 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/tests/mpi/coarse_grid_common.h b/tests/mpi/coarse_grid_common.h index 76b260ab60..e2a2b39b5f 100644 --- a/tests/mpi/coarse_grid_common.h +++ b/tests/mpi/coarse_grid_common.h @@ -2,7 +2,7 @@ // $Id: coarse_grid_01.cc 16363 2008-06-16 20:42:57Z bangerth $ // Version: $Name$ // -// Copyright (C) 2008, 2009 by the deal.II authors +// Copyright (C) 2008, 2009, 2011 by the deal.II authors // // This file is subject to QPL and may not be distributed // without copyright and license information. Please refer @@ -23,6 +23,9 @@ #include #include + +// given the name of a file, copy it to deallog +// and then delete it void cat_file(const char * filename) { std::ifstream in(filename); @@ -32,6 +35,9 @@ void cat_file(const char * filename) std::getline(in, s); deallog.get_file_stream() << s << "\n"; } + in.close(); + + std::remove (filename); }