Merge pull request #2514 from akva2/fix_filesystem_gcc9

changed: avoid calling parent_path on paths that has none
This commit is contained in:
Bård Skaflestad 2020-04-03 12:41:14 +02:00 committed by GitHub
commit 022ba52200
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -174,7 +174,9 @@ FileOutputMode setupLogging(int mpi_rank_, const std::string& deck_filename, con
std::string output_dir = cmdline_output_dir;
if (output_dir.empty()) {
output_dir = absolute(path(baseName).parent_path()).string();
output_dir = fpath.has_parent_path()
? absolute(fpath.parent_path()).generic_string()
: Opm::filesystem::current_path().generic_string();
}
logFileStream << output_dir << "/" << baseName;