Commit 580afc10 authored by Lukas Riedel's avatar Lukas Riedel

Accept existing tempDir in dorie-rfg

parent 915ec92e
......@@ -46,9 +46,11 @@ int main(int argc, char** argv)
= inifile.get<std::string>("general.tempDir");
const int status = mkdir(outputPath.c_str(),
S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
if (status != 0)
// allow failure because directory exists
if (status != 0 && errno != EEXIST)
DUNE_THROW(Dune::IOError,
"Output folder " << outputPath << " not writable");
"Output folder " << outputPath << " not writable. "
"Error by system: " << std::strerror(errno));
// fix output filename to ensure the file is found by Python frontend
const std::string outputFile = outputPath + "/field";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment