diff options
author | Stefan Bellon <[email protected]> | 2002-11-25 13:30:34 +0000 |
---|---|---|
committer | Stefan Bellon <[email protected]> | 2002-11-25 13:30:34 +0000 |
commit | 1289ab78e18d1c34a1de7935d6a9a7630e8b05ae (patch) | |
tree | 51d9687dbce33f047737fbee51b431446cf38e57 | |
parent | * main.h, misc.c (default_cipher_algo, default_compress_algo): New. (diff) | |
download | gnupg-1289ab78e18d1c34a1de7935d6a9a7630e8b05ae.tar.gz gnupg-1289ab78e18d1c34a1de7935d6a9a7630e8b05ae.zip |
no RISC OS filetype needed for nooutput
Diffstat (limited to '')
-rw-r--r-- | g10/ChangeLog | 5 | ||||
-rw-r--r-- | g10/plaintext.c | 35 |
2 files changed, 25 insertions, 15 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog index 13ef4224b..6cc110412 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,8 @@ +2002-11-25 Stefan Bellon <[email protected]> + + * plaintext.c (handle_plaintext) [__riscos__]: If nooutput is set, + no filetype is needed obviously. + 2002-11-24 David Shaw <[email protected]> * main.h, misc.c (default_cipher_algo, default_compress_algo): diff --git a/g10/plaintext.c b/g10/plaintext.c index 141c63ccd..a248598cd 100644 --- a/g10/plaintext.c +++ b/g10/plaintext.c @@ -121,22 +121,27 @@ handle_plaintext( PKT_plaintext *pt, md_filter_context_t *mfx, if( fp || nooutput ) ; - else if( !(fp = fopen(fname,"wb")) ) { - log_error(_("error creating `%s': %s\n"), fname, strerror(errno) ); - rc = G10ERR_CREATE_FILE; - if (errno == 106) - log_info("Do output file and input file have the same name?\n"); - goto leave; - } + else { + fp = fopen(fname,"wb"); + if( !fp ) { + log_error(_("error creating `%s': %s\n"), fname, strerror(errno) ); + rc = G10ERR_CREATE_FILE; + if (errno == 106) + log_info("Do output file and input file have the same name?\n"); + goto leave; + } - /* If there's a ,xxx extension in the embedded filename, - use that, else check whether the user input (in fname) - has a ,xxx appended, then use that in preference */ - if( (c = riscos_get_filetype_from_string( pt->name, pt->namelen )) != -1 ) - filetype = c; - if( (c = riscos_get_filetype_from_string( fname, strlen(fname) )) != -1 ) - filetype = c; - riscos_set_filetype_by_number(fname, filetype); + /* If there's a ,xxx extension in the embedded filename, + use that, else check whether the user input (in fname) + has a ,xxx appended, then use that in preference */ + if( (c = riscos_get_filetype_from_string( pt->name, + pt->namelen )) != -1 ) + filetype = c; + if( (c = riscos_get_filetype_from_string( fname, + strlen(fname) )) != -1 ) + filetype = c; + riscos_set_filetype_by_number(fname, filetype); + } #endif /* __riscos__ */ if( !pt->is_partial ) { |