diff options
author | Werner Koch <[email protected]> | 2006-08-01 12:23:34 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2006-08-01 12:23:34 +0000 |
commit | 8c219602515ae1dba5bc0da31077852dab61809e (patch) | |
tree | 49d596d702cfec2b8cc42ccaf8c90c82d5200ac5 /g10/decrypt.c | |
parent | Forgot this one. (diff) | |
parent | 2006-07-29 Marcus Brinkmann <[email protected]> (diff) | |
download | gnupg-8c219602515ae1dba5bc0da31077852dab61809e.tar.gz gnupg-8c219602515ae1dba5bc0da31077852dab61809e.zip |
Moved 1.9 branch to trunk
Diffstat (limited to '')
-rw-r--r-- | g10/decrypt.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/g10/decrypt.c b/g10/decrypt.c index 171e265a9..9a37283c1 100644 --- a/g10/decrypt.c +++ b/g10/decrypt.c @@ -27,12 +27,12 @@ #include <errno.h> #include <assert.h> +#include "gpg.h" #include "options.h" #include "packet.h" #include "errors.h" #include "iobuf.h" #include "keydb.h" -#include "memory.h" #include "util.h" #include "main.h" #include "status.h" @@ -57,7 +57,7 @@ decrypt_message( const char *filename ) int rc; int no_out=0; - /* open the message file */ + /* Open the message file. */ fp = iobuf_open(filename); if (fp && is_secured_file (iobuf_get_fd (fp))) { @@ -66,8 +66,10 @@ decrypt_message( const char *filename ) errno = EPERM; } if( !fp ) { - log_error(_("can't open `%s'\n"), print_fname_stdin(filename)); - return G10ERR_OPEN_FILE; + rc = gpg_error_from_errno (errno); + log_error (_("can't open `%s': %s\n"), print_fname_stdin(filename), + gpg_strerror (rc)); + return rc; } handle_progress (&pfx, fp, filename); @@ -183,7 +185,6 @@ decrypt_messages(int nfiles, char *files[]) next_file: /* Note that we emit file_done even after an error. */ write_status( STATUS_FILE_DONE ); - iobuf_ioctl( NULL, 2, 0, NULL); /* Invalidate entire cache. */ xfree(output); } |