aboutsummaryrefslogtreecommitdiffstats
path: root/g10/plaintext.c
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--g10/plaintext.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/g10/plaintext.c b/g10/plaintext.c
index 89043026c..6aad0ef5a 100644
--- a/g10/plaintext.c
+++ b/g10/plaintext.c
@@ -114,10 +114,13 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx,
goto leave;
}
#else /* __riscos__ */
- /* Convert all '.' in fname to '/' -- we don't create directories! */
- for( c=0; fname[c]; ++c )
- if( fname[c] == '.' )
- fname[c] = '/';
+ /* If no output filename was given, i.e. we constructed it,
+ convert all '.' in fname to '/' but not vice versa as
+ we don't create directories! */
+ if( !opt.outfile )
+ for( c=0; fname[c]; ++c )
+ if( fname[c] == '.' )
+ fname[c] = '/';
if( fp || nooutput )
;