aboutsummaryrefslogtreecommitdiffstats
path: root/g10/encode.c
diff options
context:
space:
mode:
Diffstat (limited to 'g10/encode.c')
-rw-r--r--g10/encode.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/encode.c b/g10/encode.c
index 1d7f2bd6a..a5b083548 100644
--- a/g10/encode.c
+++ b/g10/encode.c
@@ -294,7 +294,8 @@ encode_simple( const char *filename, int mode, int compat )
either partial length or fixed length with the new style
messages. */
- if( filename && !opt.textmode ) {
+ if (filename && *filename && !(*filename == '-' && !filename[1])
+ && !opt.textmode ) {
off_t tmpsize;
if ( !(tmpsize = iobuf_get_filelength(inp)) )
@@ -525,7 +526,8 @@ encode_crypt( const char *filename, STRLIST remusr )
}
}
- if( filename && !opt.textmode ) {
+ if (filename && *filename && !(*filename == '-' && !filename[1])
+ && !opt.textmode ) {
off_t tmpsize;
if ( !(tmpsize = iobuf_get_filelength(inp)) )