From 7d4c319f1112d95f32acc0e4443d519a0159930a Mon Sep 17 00:00:00 2001 From: Seemann Date: Sat, 12 Sep 2026 18:44:48 -0400 Subject: [PATCH] fix: don't modify input path if no mod used it --- .../gta3/std.asi/args_translator/xtranslator_path.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/plugins/gta3/std.asi/args_translator/xtranslator_path.hpp b/src/plugins/gta3/std.asi/args_translator/xtranslator_path.hpp index b8625f3a..25fbba6a 100644 --- a/src/plugins/gta3/std.asi/args_translator/xtranslator_path.hpp +++ b/src/plugins/gta3/std.asi/args_translator/xtranslator_path.hpp @@ -102,7 +102,8 @@ inline void path_translator_base::CallInfo::TranslatePathForMainExecutable(const // ...if not, try on the ASI paths or cleo paths if(type == AR_PATH_INE && !IsPath(arg)) { - // + // Remember the original path so it can be restored if no mod wants it. + const T* const originalArg = arg; bool bCheckModules = GetCurrentDir(arg, type, currdir, buffer); // Check if currdir is alright @@ -155,6 +156,10 @@ inline void path_translator_base::CallInfo::TranslatePathForMainExecutable(const CheckASI(); CheckCleoScripts(); } + + // Nothing wanted to translate this path, so put the original absolute path back. + // Leaving it relative makes the Win32 profile APIs resolve it against the Windows directory + if(!bSet) arg = originalArg; } } }