diff options
| author | Werner Koch <[email protected]> | 2026-06-22 16:18:19 +0200 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2026-06-22 16:19:06 +0200 |
| commit | 8dad6c1d1ccd042c5700e7fa07025ce00da590fc (patch) | |
| tree | 35e440286298e70fc01c7fb143a27020e9033e5e /src | |
| parent | json:w32: Add CRLF handling for armored output. (diff) | |
| download | gpgme-8dad6c1d1ccd042c5700e7fa07025ce00da590fc.tar.gz gpgme-8dad6c1d1ccd042c5700e7fa07025ce00da590fc.zip | |
Let gpgme_op_export also return operational errors.
* src/export.c (gpgme_op_export): On success check and return
operational errors.
--
This has been part of gpgme_op_export_ext but was obviously forgotten
to add also to the old function.
GnuPG-bug-id: 8287
Diffstat (limited to 'src')
| -rw-r--r-- | src/export.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/export.c b/src/export.c index 59bdfbc9..810ea450 100644 --- a/src/export.c +++ b/src/export.c @@ -256,7 +256,22 @@ gpgme_op_export (gpgme_ctx_t ctx, const char *pattern, err = export_start (ctx, 1, pattern, mode, keydata); if (!err) - err = _gpgme_wait_one (ctx); + { + err = _gpgme_wait_one (ctx); + if (!err) + { + /* For this synchronous operation we check for operational + * errors and return them. */ + void *hook; + op_data_t opd; + + err = _gpgme_op_data_lookup (ctx, OPDATA_EXPORT, &hook, -1, NULL); + opd = hook; + if (!err) + err = opd->err ? opd->err : opd->failure_code; + } + } + return err; } |
