aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2003-05-21 08:49:03 +0000
committerWerner Koch <[email protected]>2003-05-21 08:49:03 +0000
commit67a6cd71684bb062fd296bf8f0b2192bff9db4bf (patch)
tree86d20b2bed4a1a67f1a4c152b165b4369ff40d98
parent* progress.c (handle_progress) (diff)
downloadgnupg-67a6cd71684bb062fd296bf8f0b2192bff9db4bf.tar.gz
gnupg-67a6cd71684bb062fd296bf8f0b2192bff9db4bf.zip
* fileutil.c (is_file_compressed): Fixed checking for "-" filename.
Diffstat (limited to '')
-rw-r--r--util/ChangeLog4
-rw-r--r--util/fileutil.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/util/ChangeLog b/util/ChangeLog
index a48c00cb4..4c395ff6d 100644
--- a/util/ChangeLog
+++ b/util/ChangeLog
@@ -1,3 +1,7 @@
+2003-05-21 Werner Koch <[email protected]>
+
+ * fileutil.c (is_file_compressed): Fixed checking for "-" filename.
+
2003-04-13 David Shaw <[email protected]>
* srv.c (main): Test against wwwkeys.pgp.net.
diff --git a/util/fileutil.c b/util/fileutil.c
index 14be8b698..4a609138a 100644
--- a/util/fileutil.c
+++ b/util/fileutil.c
@@ -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.
*
@@ -200,7 +200,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 );