[svn] GnuPG - r5003 - trunk/g10

svn author wk cvs at cvs.gnupg.org
Mon May 11 11:20:58 CEST 2009


Author: wk
Date: 2009-05-11 11:20:57 +0200 (Mon, 11 May 2009)
New Revision: 5003

Modified:
   trunk/g10/ChangeLog
   trunk/g10/encode.c
   trunk/g10/sign.c
Log:
Print 'empty file' warning only with --verbose.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2009-05-11 09:20:39 UTC (rev 5002)
+++ trunk/g10/ChangeLog	2009-05-11 09:20:57 UTC (rev 5003)
@@ -1,3 +1,10 @@
+2009-05-11  Werner Koch  <wk at g10code.com>
+
+	* encode.c (encode_simple): Print empty file warning only in
+	verbose mode.  Closes bug#1039.
+	(encode_crypt): Ditto.
+	* sign.c (write_plaintext_packet): Ditto.
+
 2009-05-10  David Shaw  <dshaw at jabberwocky.com>
 
 	* keyserver.c (keyserver_typemap): gpgkeys_hkp handles hkps as

Modified: trunk/g10/encode.c
===================================================================
--- trunk/g10/encode.c	2009-05-11 09:20:39 UTC (rev 5002)
+++ trunk/g10/encode.c	2009-05-11 09:20:57 UTC (rev 5003)
@@ -307,7 +307,7 @@
         int overflow;
 
 	if ( !(tmpsize = iobuf_get_filelength(inp, &overflow))
-             && !overflow )
+             && !overflow && opt.verbose)
           log_info(_("WARNING: `%s' is an empty file\n"), filename );
         /* We can't encode the length of very large files because
            OpenPGP uses only 32 bit for file sizes.  So if the the
@@ -607,7 +607,7 @@
         int overflow;
 
 	if ( !(tmpsize = iobuf_get_filelength(inp, &overflow))
-             && !overflow )
+             && !overflow && opt.verbose)
           log_info(_("WARNING: `%s' is an empty file\n"), filename );
         /* We can't encode the length of very large files because
            OpenPGP uses only 32 bit for file sizes.  So if the the

Modified: trunk/g10/sign.c
===================================================================
--- trunk/g10/sign.c	2009-05-11 09:20:39 UTC (rev 5002)
+++ trunk/g10/sign.c	2009-05-11 09:20:57 UTC (rev 5003)
@@ -557,7 +557,7 @@
         int overflow;
 
         if( !(tmpsize = iobuf_get_filelength(inp, &overflow))
-            && !overflow )
+            && !overflow && opt.verbose)
 	  log_info (_("WARNING: `%s' is an empty file\n"), fname);
 
         /* We can't encode the length of very large files because




More information about the Gnupg-commits mailing list