From 57d5eefd26e804a4482935a75fff8fb09f5b8ae0 Mon Sep 17 00:00:00 2001 From: Arne Morten Kvarving Date: Thu, 2 Apr 2020 15:24:49 +0200 Subject: [PATCH] changed: avoid calling parent_path on paths that has none causes a throw on gcc-9 --- flow/flow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/flow/flow.cpp b/flow/flow.cpp index b654298d6..9a85af5cb 100644 --- a/flow/flow.cpp +++ b/flow/flow.cpp @@ -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;