From 803ca2863a6daa505824ed4831d981f034c4e298 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Thu, 28 Mar 2019 18:29:50 -0400 Subject: [PATCH] Use resolved, absolute paths in doom-project api Ensures projectile caches files under the right key. --- core/autoload/projects.el | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/core/autoload/projects.el b/core/autoload/projects.el index c02778d36..74c872a30 100644 --- a/core/autoload/projects.el +++ b/core/autoload/projects.el @@ -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." (unless (file-directory-p dir) (error "Directory %S does not exist" dir)) - (let* ((default-directory dir) + (let* ((default-directory (file-truename (expand-file-name dir))) (projectile-project-root (or (projectile-project-root) - dir))) + default-directory))) (call-interactively ;; Intentionally avoid `helm-projectile-find-file', because it runs ;; asynchronously, and thus doesn't see the lexical `default-directory' @@ -96,7 +96,7 @@ the search will be rooted from DIR." ;;;###autoload (defun doom-project-browse (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 (cond ((featurep! :completion ivy) #'counsel-find-file)