From f7f3043653abe699602f910ddd09c1405675c7f6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 2 May 2018 19:03:07 +0200 Subject: [PATCH] gpg: Fix "Too many open files" when using --multifile. * 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 --- common/miscellaneous.c | 1 + 1 file changed, 1 insertion(+) diff --git a/common/miscellaneous.c b/common/miscellaneous.c index caeb66f81..62ac05a84 100644 --- a/common/miscellaneous.c +++ b/common/miscellaneous.c @@ -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;