diff --git a/src/cpp/cse_config_parser.cpp b/src/cpp/cse_config_parser.cpp index a8b8f9653..2469bb034 100644 --- a/src/cpp/cse_config_parser.cpp +++ b/src/cpp/cse_config_parser.cpp @@ -681,9 +681,10 @@ std::pair load_cse_config( std::optional overrideStartTime) { simulator_map simulatorMap; - const auto configFile = boost::filesystem::is_regular_file(configPath) - ? configPath - : configPath / "OspSystemStructure.xml"; + const auto absolutePath = boost::filesystem::absolute(configPath); + const auto configFile = boost::filesystem::is_regular_file(absolutePath) + ? absolutePath + : absolutePath / "OspSystemStructure.xml"; const auto baseURI = path_to_file_uri(configFile); const auto parser = cse_config_parser(configFile); diff --git a/src/cpp/ssp_parser.cpp b/src/cpp/ssp_parser.cpp index a928a726b..cefed9ad5 100644 --- a/src/cpp/ssp_parser.cpp +++ b/src/cpp/ssp_parser.cpp @@ -307,9 +307,10 @@ std::pair load_ssp( std::optional overrideStartTime) { simulator_map simulatorMap; - const auto configFile = boost::filesystem::is_regular_file(configPath) - ? configPath - : configPath / "SystemStructure.ssd"; + const auto absolutePath = boost::filesystem::absolute(configPath); + const auto configFile = boost::filesystem::is_regular_file(absolutePath) + ? absolutePath + : absolutePath / "SystemStructure.ssd"; const auto baseURI = path_to_file_uri(configFile); const auto parser = ssp_parser(configFile);