mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +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;
|
fp = fname ? es_fopen (fname, "wbx,mode=-rw") : NULL;
|
||||||
if (!fp)
|
if (!fp)
|
||||||
{
|
{
|
||||||
|
err = gpg_error_from_syserror ();
|
||||||
log_error ("can't create '%s': %s\n", fname, gpg_strerror (err));
|
log_error ("can't create '%s': %s\n", fname, gpg_strerror (err));
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
|
|
||||||
err = nvc_write (pk, fp);
|
err = nvc_write (pk, fp);
|
||||||
if (!err)
|
if (!err && es_fflush (fp))
|
||||||
err = es_fflush (fp);
|
err = gpg_error_from_syserror ();
|
||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
log_error ("error writing '%s': %s\n", fname, gpg_strerror (err));
|
log_error ("error writing '%s': %s\n", fname, gpg_strerror (err));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user