aboutsummaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/plaintext.c')
-rw-r--r--g10/plaintext.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index e32272232..8918d199c 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -105,8 +105,8 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
if( nooutput )
;
- else if( !*fname || (*fname=='-' && !fname[1])) {
- /* no filename or "-" given; write to stdout */
+ else if ( iobuf_is_pipe_filename (fname) ) {
+ /* No filename or "-" given; write to stdout. */
fp = stdout;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );