Fix "No such file or directory" "vc-nil" in project-files

* lisp/progmodes/project.el (project-files):
Fix vc-nil backend error (bug#80013).
This commit is contained in:
Dmitry Gutov 2025-12-18 03:48:11 +02:00
parent 22719d64e9
commit 75a1403ff3

View file

@ -685,7 +685,8 @@ See `project-vc-extra-root-markers' for the marker value format.")
(backend (cadr project)))
(when backend
(require (intern (concat "vc-" (downcase (symbol-name backend))))))
(if (file-in-directory-p dir (nth 2 project))
(if (and backend
(file-in-directory-p dir (nth 2 project)))
(condition-case nil
(project--vc-list-files dir backend ignores)
(vc-not-supported