mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
* configure.ac: Actually name the option --disable-finger and not
http. * openfile.c (overwrite_filep, make_outfile_name, open_outfile) (open_sigfile): Use iobuf_is_pipe_filename to check for pipes so that special filesnames are taken into account. This is bug 327. * tdbdump.c (import_ownertrust): Ditto. * sign.c (write_plaintext_packet): Ditto. * progress.c (handle_progress): Ditto. * plaintext.c (handle_plaintext): Ditto. * encode.c (encode_simple, encode_crypt): Ditto. * iobuf.c (iobuf_is_pipe_filename): New. * fileutil.c (is_file_compressed): Use it here.
This commit is contained in:
parent
c44e66f352
commit
620ac79ebf
14 changed files with 52 additions and 27 deletions
|
@ -1,3 +1,8 @@
|
|||
2004-10-13 Werner Koch <wk@g10code.com>
|
||||
|
||||
* iobuf.c (iobuf_is_pipe_filename): New.
|
||||
* fileutil.c (is_file_compressed): Use it here.
|
||||
|
||||
2004-09-30 David Shaw <dshaw@jabberwocky.com>
|
||||
|
||||
* iobuf.c (pop_filter): Make static.
|
||||
|
|
|
@ -200,7 +200,7 @@ is_file_compressed( const char *s, int *ret_rc )
|
|||
{ 4, { 0x50, 0x4b, 0x03, 0x04 } }, /* (pk)zip */
|
||||
};
|
||||
|
||||
if ( !s || (*s == '-' && !s[1]) || !ret_rc )
|
||||
if ( iobuf_is_pipe_filename (s) || !ret_rc )
|
||||
return 0; /* We can't check stdin or no file was given */
|
||||
|
||||
a = iobuf_open( s );
|
||||
|
|
10
util/iobuf.c
10
util/iobuf.c
|
@ -1005,6 +1005,16 @@ check_special_filename ( const char *fname )
|
|||
return -1;
|
||||
}
|
||||
|
||||
/* This fucntion returns true if FNAME indicates a PIPE (stdout or
|
||||
stderr) or a special file name if those are enabled. */
|
||||
int
|
||||
iobuf_is_pipe_filename (const char *fname)
|
||||
{
|
||||
if (!fname || (*fname=='-' && !fname[1]) )
|
||||
return 1;
|
||||
return check_special_filename (fname) != -1;
|
||||
}
|
||||
|
||||
/****************
|
||||
* Create a head iobuf for reading from a file
|
||||
* returns: NULL if an error occures and sets errno
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue