]> git.eshelyaron.com Git - emacs.git/commitdiff
Catch 'permission-denied' during project lookup
authorDmitry Gutov <dmitry@gutov.dev>
Wed, 1 Nov 2023 01:58:45 +0000 (03:58 +0200)
committerDmitry Gutov <dmitry@gutov.dev>
Wed, 1 Nov 2023 01:58:45 +0000 (03:58 +0200)
* lisp/progmodes/project.el (project--find-in-directory):
Catch 'permission-denied' (bug#66317).

Co-Authored-By: Spencer Baugh <sbaugh@catern.com>
lisp/progmodes/project.el

index ac230bd0b83bce982121dfb359abbe14d327607a..76c5144b4848c577a94d1beb57e3d6519fe82af3 100644 (file)
@@ -245,7 +245,12 @@ of the project instance object."
     pr))
 
 (defun project--find-in-directory (dir)
-  (run-hook-with-args-until-success 'project-find-functions dir))
+  ;; Use 'ignore-error' when 27.1 is the minimum supported.
+  (condition-case nil
+      (run-hook-with-args-until-success 'project-find-functions dir)
+    ;; Maybe we'd like to continue to the next backend instead?  Let's
+    ;; see if somebody ever ends up in that situation.
+    (permission-denied nil)))
 
 (defvar project--within-roots-fallback nil)