aboutsummaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/plaintext.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index a09e5e9e4..6eecb6944 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -105,13 +105,14 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
if( nooutput )
;
- else if ( iobuf_is_pipe_filename (fname) ) {
+ else if ( iobuf_is_pipe_filename (fname) || !*fname)
+ {
/* No filename or "-" given; write to stdout. */
fp = stdout;
#ifdef HAVE_DOSISH_SYSTEM
setmode ( fileno(fp) , O_BINARY );
#endif
- }
+ }
else {
while( !overwrite_filep (fname) ) {
char *tmp = ask_outfile_name (NULL, 0);