aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/GpgCoreInit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r--src/core/GpgCoreInit.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp
index e761b857..34ac866b 100644
--- a/src/core/GpgCoreInit.cpp
+++ b/src/core/GpgCoreInit.cpp
@@ -124,6 +124,17 @@ auto InitGpgME() -> bool {
return false;
}
+#if defined(_WIN32) || defined(WIN32)
+ auto w32spawn_dir =
+ GlobalSettingStation::GetInstance().GetAppDir() + "/../gnupg/bin";
+ if (gpgme_set_global_flag("w32-inst-dir",
+ w32spawn_dir.toUtf8().constData()) != 0) {
+ LOG_E() << "gpgme_set_global_flag() with argument 'w32spawn_dir' failed, "
+ "abort...";
+ return false;
+ }
+#endif
+
if (CheckGpgError(
gpgme_set_locale(nullptr, LC_CTYPE, setlocale(LC_CTYPE, nullptr))) !=
GPG_ERR_NO_ERROR) {