diff --git a/include/teqp/models/multifluid.hpp b/include/teqp/models/multifluid.hpp index b47bdc568b3b8c4d24d69f48192989061790b76a..be804d1f37d24c9e056a9bdf8c0d57efe616b9ec 100644 --- a/include/teqp/models/multifluid.hpp +++ b/include/teqp/models/multifluid.hpp @@ -897,12 +897,13 @@ inline auto make_pure_components_JSON(const nlohmann::json& components, const st auto aliasmap = build_alias_map(root); std::vector<std::string> abspaths; for (auto c : components) { + auto cstr = c.get<std::string>(); // Allow matching of absolute paths first - if (std::filesystem::is_regular_file(c)) { - abspaths.push_back(c.get<std::string>()); + if (std::filesystem::is_regular_file(cstr)) { + abspaths.push_back(cstr); } else { - abspaths.push_back(aliasmap[c]); + abspaths.push_back(aliasmap[cstr]); } } // Backup lookup with absolute paths resolved for each component