diff options
author | Werner Koch <wk@gnupg.org> | 2024-11-07 15:06:17 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2024-11-07 15:06:17 +0100 |
commit | 74e81f830dc26aa09f6ed3254f965d50c7f31d02 (patch) | |
tree | 690bacd47ca8cf1a0103c0b49da1fcbee9a2f4e6 /g10/pubkey-enc.c | |
parent | gpg-mail-type: Assume text/plain for missing content-type. (diff) | |
download | gnupg2-74e81f830dc26aa09f6ed3254f965d50c7f31d02.tar.xz gnupg2-74e81f830dc26aa09f6ed3254f965d50c7f31d02.zip |
gpgtar: Make sure to create upper directories for regular files.
* tools/gpgtar-extract.c (extract_directory): Factor parent directory
creation out to ..
(try_mkdir_p): new.
(extract_regular): Create directory on ENOENT.
* g10/pubkey-enc.c (get_it): Use log_info instead of log_error if the
public key was not found for preference checking.
--
If tarball was created with
tar cf tarball file1.txt foo/file2.txt
the tarball has no entry for foo/ and thus the extraction fails. This
patch fixes this.
GnuPG-bug-id: 7380
The second patch avoid a wrong exist status status line due to the use
of log_error. But the actual cause needs stuill needs tobe
investigated.
Diffstat (limited to 'g10/pubkey-enc.c')
-rw-r--r-- | g10/pubkey-enc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/pubkey-enc.c b/g10/pubkey-enc.c index a83d97495..4d2d6d46b 100644 --- a/g10/pubkey-enc.c +++ b/g10/pubkey-enc.c @@ -449,8 +449,8 @@ get_it (ctrl_t ctrl, if (!pkb) { - err = -1; - log_error ("oops: public key not found for preference check\n"); + err = gpg_error (GPG_ERR_UNEXPECTED); + log_info ("oops: public key not found for preference check\n"); } else if (pkb->pkt->pkt.public_key->selfsigversion > 3 && dek->algo != CIPHER_ALGO_3DES |