Fix save files not getting redirected without include directories.

This commit is contained in:
Skyth 2025-01-22 16:49:10 +03:00
parent 010c0a9fdf
commit 93d2242b85

View file

@ -26,9 +26,6 @@ static std::vector<Mod> g_mods;
std::filesystem::path ModLoader::ResolvePath(std::string_view path) std::filesystem::path ModLoader::ResolvePath(std::string_view path)
{ {
if (g_mods.empty())
return {};
std::string_view root; std::string_view root;
size_t sepIndex = path.find(":\\"); size_t sepIndex = path.find(":\\");
@ -51,6 +48,9 @@ std::filesystem::path ModLoader::ResolvePath(std::string_view path)
return {}; return {};
} }
if (g_mods.empty())
return {};
thread_local xxHashMap<std::filesystem::path> s_cache; thread_local xxHashMap<std::filesystem::path> s_cache;
XXH64_hash_t hash = XXH3_64bits(path.data(), path.size()); XXH64_hash_t hash = XXH3_64bits(path.data(), path.size());