1
0
Fork 0

Set the current directory earlier in the initialization process

This commit is contained in:
Duncan Ogilvie 2023-08-01 14:39:40 +02:00
parent 3a30af1dc7
commit 0e5e31aedc
2 changed files with 3 additions and 1 deletions

View File

@ -78,6 +78,9 @@ static const wchar_t* InitializeUserDirectory()
*backslash = L'\0';
// Set the current directory to the application directory
SetCurrentDirectoryW(szUserDirectory);
// Extract the file name of the x64dbg executable (without extension)
auto fileNameWithoutExtension = backslash + 1;
auto period = wcschr(fileNameWithoutExtension, L'.');

View File

@ -752,7 +752,6 @@ extern "C" DLL_EXPORT const char* _dbg_dbginit()
}
}
dprintf(QT_TRANSLATE_NOOP("DBG", "Symbol Path: %s\n"), szSymbolCachePath);
SetCurrentDirectoryW(StringUtils::Utf8ToUtf16(szProgramDir).c_str());
dputs(QT_TRANSLATE_NOOP("DBG", "Allocating message stack..."));
gMsgStack = MsgAllocStack();
if(!gMsgStack)