aboutsummaryrefslogtreecommitdiffstats
path: root/src/m_gpg_info
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2026-04-24 18:30:04 +0200
committersaturneric <[email protected]>2026-04-24 18:30:04 +0200
commitda0dfb360a446c135d42d6ad1e6a6c711a61fca5 (patch)
tree9ca652c5a2f14e603b2f8651fd67d2781c4fd356 /src/m_gpg_info
parentfix(version-checking): avoid thread race on UI (diff)
downloadmodules-da0dfb360a446c135d42d6ad1e6a6c711a61fca5.tar.gz
modules-da0dfb360a446c135d42d6ad1e6a6c711a61fca5.zip
fix(email): avoid blocking when opening email file
* Moves file reading and tab creation onto the GUI thread to prevent blocking and potential deadlocks from blocking queued invokes * Uses non-blocking error reporting in async flow to avoid invalid early returns * Skips GnuPG info gathering when `gpgconf` path is missing to prevent pointless work and errors
Diffstat (limited to 'src/m_gpg_info')
-rw-r--r--src/m_gpg_info/GnuPGInfoGatheringModule.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/m_gpg_info/GnuPGInfoGatheringModule.cpp b/src/m_gpg_info/GnuPGInfoGatheringModule.cpp
index d8c897f..e2d3012 100644
--- a/src/m_gpg_info/GnuPGInfoGatheringModule.cpp
+++ b/src/m_gpg_info/GnuPGInfoGatheringModule.cpp
@@ -54,7 +54,7 @@
#include "GpgInfo.h"
GF_MODULE_API_DEFINE_V2("com.bktus.gpgfrontend.module.gnupg_info_gathering",
- "GatherGnupgInfo", "1.2.1",
+ "GatherGnupgInfo", "1.2.2",
"Try gathering gnupg information.", "Saturneric")
DEFINE_TRANSLATIONS_STRUCTURE(ModuleGnuPGInfoGathering);
@@ -206,6 +206,11 @@ auto StartGatheringAllGnuPGInfo() -> int {
DUP("core"), DUP("gpgme.ctx.gpgconf_path"), DUP("")));
MLogDebug(QString("got gpgconf path from rt: %1").arg(gpgconf_path));
+ if (gpgconf_path.isEmpty()) {
+ MLogDebug("gpgconf path is empty, skip gathering gnupg info.");
+ return -1;
+ }
+
auto default_home_path = UDUP(GFModuleRetrieveRTValueOrDefault(
DUP("core"), DUP("gpgme.ctx.default_database_path"), DUP("")));
MLogDebug(