From 4687802434f6593144cc884f792c7b4aa2935ccd Mon Sep 17 00:00:00 2001
From: Ian Bell <ian.bell@nist.gov>
Date: Sat, 5 Nov 2022 10:50:03 -0400
Subject: [PATCH] Fix alias looking up

(no implicit conversion of nlohmann::json to filesystem)
---
 include/teqp/models/multifluid.hpp | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/include/teqp/models/multifluid.hpp b/include/teqp/models/multifluid.hpp
index b47bdc5..be804d1 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
-- 
GitLab