From 28eb86c0063dabf55763e00c4f9abcae8117c493 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 1 Jul 1999 10:53:35 +0000 Subject: See ChangeLog: Thu Jul 1 12:47:31 CEST 1999 Werner Koch --- g10/plaintext.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'g10/plaintext.c') diff --git a/g10/plaintext.c b/g10/plaintext.c index 1edca16e5..878bdc46b 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -65,15 +65,15 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, } else if( !opt.use_embedded_filename ) { fname = make_outfile_name( iobuf_get_real_fname(pt->buf) ); + if( !fname ) + fname = ask_outfile_name( pt->name, pt->namelen ); if( !fname ) { rc = G10ERR_CREATE_FILE; goto leave; } } else { - fname = m_alloc( pt->namelen +1 ); - memcpy( fname, pt->name, pt->namelen ); - fname[pt->namelen] = 0; + fname = make_printable_string( pt->name, pt->namelen, 0 ); } if( nooutput ) -- cgit v1.2.3