mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
gpg: Display the correct error message.
* g10/trustdb.c (validate_keys): If tdbio_update_version_record fails, RC does not contain the error code. Save the error code in rc2 and use that. -- Signed-off-by: Neal H. Walfield <neal@g10code.com>
This commit is contained in:
parent
d68bdc553a
commit
641df615da
@ -2106,6 +2106,8 @@ validate_keys (int interactive)
|
|||||||
release_key_hash_table (stored);
|
release_key_hash_table (stored);
|
||||||
if (!rc && !quit) /* mark trustDB as checked */
|
if (!rc && !quit) /* mark trustDB as checked */
|
||||||
{
|
{
|
||||||
|
int rc2;
|
||||||
|
|
||||||
if (next_expire == 0xffffffff || next_expire < start_time )
|
if (next_expire == 0xffffffff || next_expire < start_time )
|
||||||
tdbio_write_nextcheck (0);
|
tdbio_write_nextcheck (0);
|
||||||
else
|
else
|
||||||
@ -2115,11 +2117,12 @@ validate_keys (int interactive)
|
|||||||
strtimestamp (next_expire));
|
strtimestamp (next_expire));
|
||||||
}
|
}
|
||||||
|
|
||||||
if(tdbio_update_version_record()!=0)
|
rc2 = tdbio_update_version_record ();
|
||||||
|
if (rc2)
|
||||||
{
|
{
|
||||||
log_error(_("unable to update trustdb version record: "
|
log_error (_("unable to update trustdb version record: "
|
||||||
"write failed: %s\n"), gpg_strerror (rc));
|
"write failed: %s\n"), gpg_strerror (rc2));
|
||||||
tdbio_invalid();
|
tdbio_invalid ();
|
||||||
}
|
}
|
||||||
|
|
||||||
do_sync ();
|
do_sync ();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user