gpg: Fix "Too many open files" when using --multifile.
authorWerner Koch <wk@gnupg.org>
Wed, 2 May 2018 17:03:07 +0000 (19:03 +0200)
committerWerner Koch <wk@gnupg.org>
Wed, 2 May 2018 17:03:07 +0000 (19:03 +0200)
* common/miscellaneous.c (is_file_compressed): Don't cache the file.
--

This seems to be a pretty old bug.  The fix is easy and also reveals
that -z0 can be used as a workaround.

GnuPG-bug-id: 3951
Signed-off-by: Werner Koch <wk@gnupg.org>
common/miscellaneous.c

index caeb66f..62ac05a 100644 (file)
@@ -401,6 +401,7 @@ is_file_compressed (const char *s, int *ret_rc)
         *ret_rc = gpg_error_from_syserror ();
         return 0;
     }
+    iobuf_ioctl (a, IOBUF_IOCTL_NO_CACHE, 1, NULL);
 
     if ( iobuf_get_filelength( a, &overflow ) < 6 && !overflow) {
         *ret_rc = 0;