]> git.eshelyaron.com Git - emacs.git/commitdiff
Don't have epg bug out on non-existent packages
authorLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Sep 2021 10:15:21 +0000 (12:15 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Wed, 1 Sep 2021 13:56:04 +0000 (15:56 +0200)
* lisp/epg.el (epg--start): We may be called from contexts where
the directory doesn't exist, but we need to have an existing
directory here for the process (bug#32004).

lisp/epg.el

index 67d723b961b1ee720d156ae9c659fb189fb684db..a461afac34bce3f3459e4fd7d6d69466b45ea2a0 100644 (file)
@@ -657,16 +657,17 @@ callback data (if any)."
                             :sentinel #'ignore
                             :noquery t))
     (setf (epg-context-error-buffer context) (process-buffer error-process))
-    (with-file-modes 448
-      (setq process (make-process :name "epg"
-                                 :buffer buffer
-                                 :command (cons (epg-context-program context)
-                                                args)
-                                 :connection-type 'pipe
-                                 :coding 'raw-text
-                                 :filter #'epg--process-filter
-                                 :stderr error-process
-                                 :noquery t)))
+    (with-existing-directory
+      (with-file-modes 448
+        (setq process (make-process :name "epg"
+                                   :buffer buffer
+                                   :command (cons (epg-context-program context)
+                                                  args)
+                                   :connection-type 'pipe
+                                   :coding 'raw-text
+                                   :filter #'epg--process-filter
+                                   :stderr error-process
+                                   :noquery t))))
     (setf (epg-context-process context) process)))
 
 (defun epg--process-filter (process input)