1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

* fileutil.c (is_file_compressed): Fix the check for the "-" file

name.
This commit is contained in:
Werner Koch 2003-05-21 08:40:18 +00:00
parent d5afcca57f
commit 905e6b2528
3 changed files with 13 additions and 7 deletions

View file

@ -1,5 +1,5 @@
/* fileutil.c - file utilities
* Copyright (C) 1998 Free Software Foundation, Inc.
* Copyright (C) 1998, 2003 Free Software Foundation, Inc.
*
* This file is part of GnuPG.
*
@ -205,7 +205,7 @@ is_file_compressed( const char *s, int *ret_rc )
{ 4, { 0x50, 0x4b, 0x03, 0x04 } }, /* (pk)zip */
};
if ( !s || *s == '-' || !ret_rc )
if ( !s || (*s == '-' && !s[1]) || !ret_rc )
return 0; /* We can't check stdin or no file was given */
a = iobuf_open( s );