From 1cdbeecc8580746359f484496f1866f754da80a2 Mon Sep 17 00:00:00 2001 From: David Wells Date: Thu, 16 Mar 2017 18:22:39 -0400 Subject: [PATCH] Check that we successfully created a directory. --- examples/step-42/step-42.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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; -- 2.39.5