diff options
author | saturneric <[email protected]> | 2024-01-17 11:39:47 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-17 11:39:47 +0000 |
commit | e352e8e6b8d03a24ef5d52eef3e4d370807b5bbd (patch) | |
tree | 9a59f0b573a845644afe4b8857a89c4b28bdcc0d /src/core/function/KeyPackageOperator.cpp | |
parent | fix: solve the gnupg tab options info not shown issue (diff) | |
download | GpgFrontend-e352e8e6b8d03a24ef5d52eef3e4d370807b5bbd.tar.gz GpgFrontend-e352e8e6b8d03a24ef5d52eef3e4d370807b5bbd.zip |
fix: find and slove some bugs
Diffstat (limited to 'src/core/function/KeyPackageOperator.cpp')
-rw-r--r-- | src/core/function/KeyPackageOperator.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/core/function/KeyPackageOperator.cpp b/src/core/function/KeyPackageOperator.cpp index d15859a3..abb84512 100644 --- a/src/core/function/KeyPackageOperator.cpp +++ b/src/core/function/KeyPackageOperator.cpp @@ -64,8 +64,10 @@ void KeyPackageOperator::GenerateKeyPackage(const QString& key_package_path, return; } - if (data_obj == nullptr || !data_obj->Check<GFBuffer>()) { - throw std::runtime_error("data object doesn't pass checking"); + if (CheckGpgError(err) == GPG_ERR_USER_1 || data_obj == nullptr || + !data_obj->Check<GFBuffer>()) { + cb(-1, data_obj); + return; } auto gf_buffer = ExtractParams<GFBuffer>(data_obj, 0); |