(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
(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)