From 280026404026209425d1509f4c789592874a6eb3 Mon Sep 17 00:00:00 2001 From: otavepto <153766569+otavepto@users.noreply.github.com> Date: Sat, 20 Jan 2024 22:51:40 +0200 Subject: [PATCH] make sure mod path is absolute and normalized for current OS --- dll/settings_parser.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dll/settings_parser.cpp b/dll/settings_parser.cpp index 24a399f5..ec261e19 100644 --- a/dll/settings_parser.cpp +++ b/dll/settings_parser.cpp @@ -822,6 +822,9 @@ static void try_parse_mods_file(class Settings *settings_client, Settings *setti newMod.path = mod.value().value("path", std::string("")); if (newMod.path.empty()) { newMod.path = mods_folder + PATH_SEPARATOR + std::string(mod.key()); + } else { + // make sure the path is normalized for current OS, and absolute + newMod.path = std::filesystem::absolute(newMod.path).u8string(); } newMod.fileType = k_EWorkshopFileTypeCommunity;