diff --git a/src/bridge/bridgemain.cpp b/src/bridge/bridgemain.cpp index c1809f42..2b4e0b66 100644 --- a/src/bridge/bridgemain.cpp +++ b/src/bridge/bridgemain.cpp @@ -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'.'); diff --git a/src/dbg/x64dbg.cpp b/src/dbg/x64dbg.cpp index dd16b271..8c32bd63 100644 --- a/src/dbg/x64dbg.cpp +++ b/src/dbg/x64dbg.cpp @@ -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)