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; } } }