epg.el (epg-decrypt-file): Don't remove input-file.
authorueno <ueno>
Wed, 12 Apr 2006 07:06:31 +0000 (07:06 +0000)
committerueno <ueno>
Wed, 12 Apr 2006 07:06:31 +0000 (07:06 +0000)
epg-file.el (epg-file-insert-file-contents): Use file-local-copy directly.

epg-file.el
epg.el

index 68e9768..d3f5da1 100644 (file)
@@ -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 (file)
--- 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)