From 37d3d49548803d24469b5c5e6a792aa94ad5aa22 Mon Sep 17 00:00:00 2001 From: ueno Date: Wed, 12 Apr 2006 07:06:31 +0000 Subject: [PATCH] epg.el (epg-decrypt-file): Don't remove input-file. epg-file.el (epg-file-insert-file-contents): Use file-local-copy directly. --- epg-file.el | 18 +++++++++--------- epg.el | 4 +--- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/epg-file.el b/epg-file.el index 68e9768..d3f5da1 100644 --- a/epg-file.el +++ b/epg-file.el @@ -93,15 +93,15 @@ with GnuPG." (let ((filename (expand-file-name filename)) (length 0)) (if (file-exists-p filename) - (let* ((local-file - (let ((inhibit-file-name-operation - (when (eq inhibit-file-name-operation - 'insert-file-contents) - 'file-local-copy))) - (file-local-copy filename))) - (coding-system-for-read 'binary) - (context (epg-make-context)) - string) + (let ((local-file + (let ((inhibit-file-name-operation + (when (eq inhibit-file-name-operation + 'insert-file-contents) + 'file-local-copy))) + (file-local-copy filename))) + (coding-system-for-read 'binary) + (context (epg-make-context)) + string) (unwind-protect (progn (setq string (epg-decrypt-file context (or local-file diff --git a/epg.el b/epg.el index ca9b4c6..9b42d60 100644 --- a/epg.el +++ b/epg.el @@ -595,9 +595,7 @@ If you are unsure, use synchronous version of this function (if (epg-context-result-for context 'error) (error "Decryption failed")) (epg-read-output context)) - (epg-reset context) - (if (file-exists-p input-file) - (delete-file input-file)))) + (epg-reset context))) ;;;###autoload (defun epg-decrypt-string (context string) -- 1.7.10.4