From: ueno Date: Wed, 12 Apr 2006 07:06:31 +0000 (+0000) Subject: epg.el (epg-decrypt-file): Don't remove input-file. X-Git-Tag: epgsm-branchpoint~124 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=37d3d49548803d24469b5c5e6a792aa94ad5aa22;p=elisp%2Fepg.git epg.el (epg-decrypt-file): Don't remove input-file. epg-file.el (epg-file-insert-file-contents): Use file-local-copy directly. --- 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)