Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
}
}
Expand Down