From 10bd83aaa1dcbfab4fe62fd2ee21db78e2005ba1 Mon Sep 17 00:00:00 2001 From: alex-z Date: Mon, 18 Oct 2021 15:30:44 +0300 Subject: [PATCH] Windows. Remove CWD from DLL search paths. Signed-off-by: alex-z --- src/cmd/cmd.cpp | 3 +++ src/gui/main.cpp | 3 +++ 2 files changed, 6 insertions(+) diff --git a/src/cmd/cmd.cpp b/src/cmd/cmd.cpp index 188d29e1c84dc..395fc1cdaa1c2 100644 --- a/src/cmd/cmd.cpp +++ b/src/cmd/cmd.cpp @@ -309,6 +309,9 @@ void selectiveSyncFixup(OCC::SyncJournalDb *journal, const QStringList &newList) int main(int argc, char **argv) { +#ifdef Q_OS_WIN + SetDllDirectory(L""); +#endif QCoreApplication app(argc, argv); #ifdef Q_OS_WIN diff --git a/src/gui/main.cpp b/src/gui/main.cpp index a7a47e16e71e8..1aa5a91985c74 100644 --- a/src/gui/main.cpp +++ b/src/gui/main.cpp @@ -51,6 +51,9 @@ void warnSystray() int main(int argc, char **argv) { +#ifdef Q_OS_WIN + SetDllDirectory(L""); +#endif Q_INIT_RESOURCE(resources); Q_INIT_RESOURCE(theme);