diff options
Diffstat (limited to '')
-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) {}); } |