diff options
author | saturneric <[email protected]> | 2025-04-18 17:35:45 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2025-04-18 17:35:45 +0000 |
commit | d115562e6cb231356ef87a2ab86f4da1159a9e41 (patch) | |
tree | c079dd49cf0a991b17cb96ad4f05d558567908c0 /src/core/GpgCoreInit.cpp | |
parent | feat: add more basic env checks at init (diff) | |
download | GpgFrontend-d115562e6cb231356ef87a2ab86f4da1159a9e41.tar.gz GpgFrontend-d115562e6cb231356ef87a2ab86f4da1159a9e41.zip |
fix: issues found on macos
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; |