From fbc4bfa4d62b0d18034df786aef26c963efd187a Mon Sep 17 00:00:00 2001 From: "Skyth (Asilkan)" <19259897+blueskythlikesclouds@users.noreply.github.com> Date: Wed, 22 Jan 2025 17:01:37 +0300 Subject: [PATCH] Fix save files not getting redirected without include directories. (#146) --- UnleashedRecomp/mod/mod_loader.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/UnleashedRecomp/mod/mod_loader.cpp b/UnleashedRecomp/mod/mod_loader.cpp index a514f1d..bc60cae 100644 --- a/UnleashedRecomp/mod/mod_loader.cpp +++ b/UnleashedRecomp/mod/mod_loader.cpp @@ -26,9 +26,6 @@ static std::vector g_mods; std::filesystem::path ModLoader::ResolvePath(std::string_view path) { - if (g_mods.empty()) - return {}; - std::string_view root; size_t sepIndex = path.find(":\\"); @@ -51,6 +48,9 @@ std::filesystem::path ModLoader::ResolvePath(std::string_view path) return {}; } + if (g_mods.empty()) + return {}; + thread_local xxHashMap s_cache; XXH64_hash_t hash = XXH3_64bits(path.data(), path.size());