emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master b3a9d8c 2/3: Don't have epg bug out on non-existent packages


From: Lars Ingebrigtsen
Subject: master b3a9d8c 2/3: Don't have epg bug out on non-existent packages
Date: Wed, 1 Sep 2021 10:27:16 -0400 (EDT)

branch: master
commit b3a9d8cd3dd8d65969d853e9e16e95bb51e61dd3
Author: Lars Ingebrigtsen <larsi@gnus.org>
Commit: Lars Ingebrigtsen <larsi@gnus.org>

    Don't have epg bug out on non-existent packages
    
    * 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 | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/lisp/epg.el b/lisp/epg.el
index 67d723b..a461afa 100644
--- a/lisp/epg.el
+++ b/lisp/epg.el
@@ -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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]