]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix error when loading a new, non-existent foo.gpg file
authorLars Ingebrigtsen <larsi@gnus.org>
Mon, 24 Aug 2020 18:50:08 +0000 (20:50 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Mon, 24 Aug 2020 18:50:08 +0000 (20:50 +0200)
* lisp/epa-file.el (epa-file-insert-file-contents): Propagate the
correct error upwards (bug introduced by fixing bug#3829, and
messing up where the `when' form ended).
Reported by "Herbert J. Skuhra" <herbert@gojira.at>.

lisp/epa-file.el

index 3b0cc84e5f62bf962429b8a681508b920af808b6..bb027b9abfb50ca480d2808b80f19f5aa5dabae0 100644 (file)
@@ -175,9 +175,9 @@ encryption is used."
                   (setq-local epa-file-error error)
                   (add-hook 'find-file-not-found-functions
                             'epa-file--find-file-not-found-function
-                            nil t)
-                  (signal (if exists 'file-error 'file-missing)
-                          (cons "Opening input file" (cdr error))))))))
+                            nil t)))
+              (signal (if exists 'file-error 'file-missing)
+                      (cons "Opening input file" (cdr error))))))
           (set-buffer buf) ;In case timer/filter changed/killed it (bug#16029)!
          (setq-local epa-file-encrypt-to
                       (mapcar #'car (epg-context-result-for