mirror of
git://git.gnupg.org/gnupg.git
synced 2025-01-08 12:44:23 +01:00
tools: Fix error handling.
* tools/gpgtar-create.c (gpgtar_create): Do not crash if opening the tarball failed. Signed-off-by: Justus Winter <justus@g10code.com>
This commit is contained in:
parent
fb3b3e1e7a
commit
5afbfdfd59
@ -853,8 +853,6 @@ gpgtar_create (char **inpattern, int encrypt, int sign)
|
|||||||
if (!outstream)
|
if (!outstream)
|
||||||
{
|
{
|
||||||
err = gpg_error_from_syserror ();
|
err = gpg_error_from_syserror ();
|
||||||
log_error (_("can't create '%s': %s\n"),
|
|
||||||
opt.outfile, gpg_strerror (err));
|
|
||||||
goto leave;
|
goto leave;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -958,7 +956,7 @@ gpgtar_create (char **inpattern, int encrypt, int sign)
|
|||||||
if (err)
|
if (err)
|
||||||
{
|
{
|
||||||
log_error ("creating tarball '%s' failed: %s\n",
|
log_error ("creating tarball '%s' failed: %s\n",
|
||||||
es_fname_get (outstream), gpg_strerror (err));
|
opt.outfile ? opt.outfile : "-", gpg_strerror (err));
|
||||||
if (outstream && outstream != es_stdout)
|
if (outstream && outstream != es_stdout)
|
||||||
es_fclose (outstream);
|
es_fclose (outstream);
|
||||||
if (cipher_stream && cipher_stream != es_stdout)
|
if (cipher_stream && cipher_stream != es_stdout)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user