Handle empty outputDir setting

The output dir must not be empty or else file names like "/FOO.INIT"
are generated which normally result in a segfault.
This commit is contained in:
Andreas Lauser 2013-11-21 15:54:22 +01:00 committed by Roland Kaufmann
parent 419cffe73b
commit f980350af2

View File

@ -936,6 +936,11 @@ EclipseWriter::EclipseWriter (
if (params.has ("output_dir")) {
outputDir_ = params.get <std::string> ("output_dir");
}
else {
// this is needed to prevent file names like "/FOO.INIT" which
// lead to segfaults
outputDir_ = ".";
}
}
// default destructor is OK, just need to be defined