diff options
author | saturneric <[email protected]> | 2024-12-02 22:53:51 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-12-02 22:53:51 +0000 |
commit | 78a5ece0391cb0e8cecde95f43afe4479a6709ab (patch) | |
tree | 9114b46fb28d58ef63546a78994cc23b6caa909a /src/init.cpp | |
parent | fix: solve memory issues of sdk apis (diff) | |
download | GpgFrontend-78a5ece0391cb0e8cecde95f43afe4479a6709ab.tar.gz GpgFrontend-78a5ece0391cb0e8cecde95f43afe4479a6709ab.zip |
fix: discovered issues
Diffstat (limited to 'src/init.cpp')
-rw-r--r-- | src/init.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/init.cpp b/src/init.cpp index 2c421040..e1668ec5 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -183,11 +183,13 @@ void ShutdownGlobalBasicEnv(const GFCxtWPtr &p_ctx) { return; } - // clear password cache - if (GlobalSettingStation::GetInstance() + auto clear_gpg_password_cache = + GlobalSettingStation::GetInstance() .GetSettings() .value("basic/clear_gpg_password_cache", false) - .toBool()) { + .toBool(); + // clear password cache + if (!ctx->unit_test_mode && clear_gpg_password_cache) { GpgAdvancedOperator::ClearGpgPasswordCache([](int, DataObjectPtr) {}); } |