diff options
author | saturneric <[email protected]> | 2024-08-05 15:49:22 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-08-05 15:49:22 +0000 |
commit | d4e2335bfdff0985d4e410bf608bf73ff1fcfca7 (patch) | |
tree | 0f43d0ebcf065abeaaac9411f1ec02f77afeca3e /src/core/function/gpg/GpgContext.cpp | |
parent | fix: remove mimalloc from source (diff) | |
download | GpgFrontend-d4e2335bfdff0985d4e410bf608bf73ff1fcfca7.tar.gz GpgFrontend-d4e2335bfdff0985d4e410bf608bf73ff1fcfca7.zip |
fix: custom key database feature not working
Diffstat (limited to '')
-rw-r--r-- | src/core/function/gpg/GpgContext.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/core/function/gpg/GpgContext.cpp b/src/core/function/gpg/GpgContext.cpp index 2d9c5992..a661f183 100644 --- a/src/core/function/gpg/GpgContext.cpp +++ b/src/core/function/gpg/GpgContext.cpp @@ -236,11 +236,10 @@ class GpgContext::Impl { const GpgContextInitArgs &args) -> bool { assert(ctx != nullptr); - if (args.custom_gpgconf && !args.custom_gpgconf_path.isEmpty()) { - LOG_D() << "set custom gpgconf path: " << args.custom_gpgconf_path; - auto err = - gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_GPGCONF, - args.custom_gpgconf_path.toUtf8(), nullptr); + if (!args.gpgconf_path.isEmpty()) { + LOG_D() << "set custom gpgconf path: " << args.gpgconf_path; + auto err = gpgme_ctx_set_engine_info(ctx, GPGME_PROTOCOL_GPGCONF, + args.gpgconf_path.toUtf8(), nullptr); if (CheckGpgError(err) != GPG_ERR_NO_ERROR) { LOG_W() << "set gpg context engine info error: " @@ -284,6 +283,7 @@ class GpgContext::Impl { // set custom gpg key db path if (!args_.db_path.isEmpty()) { + LOG_D() << "set context database path to" << args_.db_path; Module::UpsertRTValue("core", "gpgme.ctx.database_path", args_.db_path); } |