From: David Wells Date: Thu, 16 Mar 2017 22:22:39 +0000 (-0400) Subject: Check that we successfully created a directory. X-Git-Tag: v8.5.0-rc1~25^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1cdbeecc8580746359f484496f1866f754da80a2;p=dealii.git Check that we successfully created a directory. --- diff --git a/examples/step-42/step-42.cc b/examples/step-42/step-42.cc index a238022859..33220e4dae 100644 --- a/examples/step-42/step-42.cc +++ b/examples/step-42/step-42.cc @@ -876,7 +876,8 @@ namespace Step42 output_dir = prm.get("output directory"); if (output_dir != "" && *(output_dir.rbegin()) != '/') output_dir += "/"; - mkdir(output_dir.c_str(), 0777); + const int ierr = mkdir(output_dir.c_str(), 0777); + AssertThrow(ierr == 0, ExcIO()); pcout << " Using output directory '" << output_dir << "'" << std::endl; pcout << " FE degree " << fe_degree << std::endl;