mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Use resolved, absolute paths in doom-project api
Ensures projectile caches files under the right key.
This commit is contained in:
@ -82,10 +82,10 @@ Will resolve to the nearest project root above DIR. If no project can be found,
|
|||||||
the search will be rooted from DIR."
|
the search will be rooted from DIR."
|
||||||
(unless (file-directory-p dir)
|
(unless (file-directory-p dir)
|
||||||
(error "Directory %S does not exist" dir))
|
(error "Directory %S does not exist" dir))
|
||||||
(let* ((default-directory dir)
|
(let* ((default-directory (file-truename (expand-file-name dir)))
|
||||||
(projectile-project-root
|
(projectile-project-root
|
||||||
(or (projectile-project-root)
|
(or (projectile-project-root)
|
||||||
dir)))
|
default-directory)))
|
||||||
(call-interactively
|
(call-interactively
|
||||||
;; Intentionally avoid `helm-projectile-find-file', because it runs
|
;; Intentionally avoid `helm-projectile-find-file', because it runs
|
||||||
;; asynchronously, and thus doesn't see the lexical `default-directory'
|
;; asynchronously, and thus doesn't see the lexical `default-directory'
|
||||||
@ -96,7 +96,7 @@ the search will be rooted from DIR."
|
|||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defun doom-project-browse (dir)
|
(defun doom-project-browse (dir)
|
||||||
"Traverse a file structure starting linearly from DIR."
|
"Traverse a file structure starting linearly from DIR."
|
||||||
(let ((default-directory (file-truename dir)))
|
(let ((default-directory (file-truename (expand-file-name dir))))
|
||||||
(call-interactively
|
(call-interactively
|
||||||
(cond ((featurep! :completion ivy)
|
(cond ((featurep! :completion ivy)
|
||||||
#'counsel-find-file)
|
#'counsel-find-file)
|
||||||
|
Reference in New Issue
Block a user