diff options
Diffstat (limited to 'src/core/GpgCoreInit.cpp')
-rw-r--r-- | src/core/GpgCoreInit.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/core/GpgCoreInit.cpp b/src/core/GpgCoreInit.cpp index 1735c316..561c3e24 100644 --- a/src/core/GpgCoreInit.cpp +++ b/src/core/GpgCoreInit.cpp @@ -429,10 +429,6 @@ void EnsureGpgAgentConfHasPinentry(GpgContext& ctx) { } config_file.close(); LOG_D() << "updated gpg-agent.conf with pinentry:" << pinentry_path; - - // reload configure - GpgAdvancedOperator::GetInstance(ctx.GetChannel()) - .ReloadAllGpgComponents(); } else { LOG_W() << "failed to write to gpg-agent.conf"; } @@ -612,7 +608,8 @@ auto InitGpgFrontendCore(CoreInitArgs args) -> int { return -1; } -#if defined(__linux__) +#if !(defined(_WIN32) || defined(WIN32)) + // auto config pinentry-program EnsureGpgAgentConfHasPinentry(default_ctx); #endif @@ -669,6 +666,10 @@ auto InitGpgFrontendCore(CoreInitArgs args) -> int { EnsureGpgAgentConfHasPinentry(ctx); #endif +#if defined(__APPLE__) && defined(__MACH__) + EnsureGpgAgentConfHasPinentry(ctx); +#endif + if (!GpgKeyGetter::GetInstance(ctx.GetChannel()).FlushKeyCache()) { LOG_E() << "gpgme context init key cache failed, index:" << channel_index; |