[Pkg-gnupg-commit] [gnupg2] 99/292: tools: Fix error handling.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Mon Nov 21 06:31:30 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch master
in repository gnupg2.

commit 5afbfdfd59540cb882d891ff1f4afa73fe48f99a
Author: Justus Winter <justus at g10code.com>
Date:   Fri Oct 7 12:52:09 2016 +0200

    tools: Fix error handling.
    
    * tools/gpgtar-create.c (gpgtar_create): Do not crash if opening the
    tarball failed.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 tools/gpgtar-create.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/tools/gpgtar-create.c b/tools/gpgtar-create.c
index 6adc1f5..6780eff 100644
--- a/tools/gpgtar-create.c
+++ b/tools/gpgtar-create.c
@@ -853,8 +853,6 @@ gpgtar_create (char **inpattern, int encrypt, int sign)
       if (!outstream)
         {
           err = gpg_error_from_syserror ();
-          log_error (_("can't create '%s': %s\n"),
-                     opt.outfile, gpg_strerror (err));
           goto leave;
         }
     }
@@ -958,7 +956,7 @@ gpgtar_create (char **inpattern, int encrypt, int sign)
   if (err)
     {
       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)
         es_fclose (outstream);
       if (cipher_stream && cipher_stream != es_stdout)

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list