mirror of
git://git.gnupg.org/gnupg.git
synced 2025-06-30 22:27:56 +02:00
* fileutil.c (is_file_compressed): Fix the check for the "-" file
name.
This commit is contained in:
parent
d5afcca57f
commit
905e6b2528
@ -1,3 +1,8 @@
|
|||||||
|
2003-05-21 Werner Koch <wk@gnupg.org>
|
||||||
|
|
||||||
|
* fileutil.c (is_file_compressed): Fix the check for the "-" file
|
||||||
|
name.
|
||||||
|
|
||||||
2003-03-23 David Shaw <dshaw@jabberwocky.com>
|
2003-03-23 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* argparse.c (default_strusage): Change copyright date.
|
* argparse.c (default_strusage): Change copyright date.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/* fileutil.c - file utilities
|
/* 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.
|
* 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 */
|
{ 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 */
|
return 0; /* We can't check stdin or no file was given */
|
||||||
|
|
||||||
a = iobuf_open( s );
|
a = iobuf_open( s );
|
||||||
|
@ -1834,13 +1834,14 @@ iobuf_set_limit( IOBUF a, off_t nlimit )
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
/****************
|
/*
|
||||||
* Return the length of an open file
|
* Return the length of an open file.
|
||||||
*/
|
*/
|
||||||
off_t
|
off_t
|
||||||
iobuf_get_filelength( IOBUF a )
|
iobuf_get_filelength( IOBUF a )
|
||||||
{
|
{
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
const char *s;
|
||||||
|
|
||||||
if( a->directfp ) {
|
if( a->directfp ) {
|
||||||
FILE *fp = a->directfp;
|
FILE *fp = a->directfp;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user