mirror of
git://git.gnupg.org/gnupg.git
synced 2024-12-22 10:19:57 +01:00
agent: Fix printed error in findkey.
* agent/findkey.c (agent_write_private_key): Fix error reporting.
This commit is contained in:
parent
fe881167c5
commit
7cf8c5c291
@ -237,13 +237,14 @@ agent_write_private_key (const unsigned char *grip,
|
||||
fp = fname ? es_fopen (fname, "wbx,mode=-rw") : NULL;
|
||||
if (!fp)
|
||||
{
|
||||
err = gpg_error_from_syserror ();
|
||||
log_error ("can't create '%s': %s\n", fname, gpg_strerror (err));
|
||||
goto leave;
|
||||
}
|
||||
|
||||
err = nvc_write (pk, fp);
|
||||
if (!err)
|
||||
err = es_fflush (fp);
|
||||
if (!err && es_fflush (fp))
|
||||
err = gpg_error_from_syserror ();
|
||||
if (err)
|
||||
{
|
||||
log_error ("error writing '%s': %s\n", fname, gpg_strerror (err));
|
||||
|
Loading…
x
Reference in New Issue
Block a user