mirror of
https://github.com/OPM/opm-simulators.git
synced 2024-12-30 11:06:55 -06:00
Merge pull request #2514 from akva2/fix_filesystem_gcc9
changed: avoid calling parent_path on paths that has none
This commit is contained in:
commit
022ba52200
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user