(project-find-regexp): Fix the temporary value of DEFAULT-DIRECTORY

* lisp/progmodes/project.el (project-find-regexp): Make sure the
assigned value of DEFAULT-DIRECTORY ends with a slash.
read-directory-name returns the name without it in certain cases.
This commit is contained in:
Dmitry Gutov 2024-08-13 15:14:18 +03:00
parent 616a93d185
commit 4589f51c21

View file

@ -1001,7 +1001,7 @@ requires quoting, e.g. `\\[quoted-insert]<space>'."
(project-files pr)
(let* ((dir (read-directory-name "Base directory: "
caller-dir nil t)))
(setq default-directory dir)
(setq default-directory (file-name-as-directory dir))
(project--files-in-directory dir
nil
(grep-read-files regexp))))))