Fix #3004: stale root cache on project search
This commit is contained in:
parent
f7655de598
commit
ba8892d7e9
2 changed files with 13 additions and 12 deletions
|
@ -101,11 +101,10 @@ If DIR is not a project, it will be indexed (but not cached)."
|
|||
(unless (file-readable-p dir)
|
||||
(error "Directory %S isn't readable" dir))
|
||||
(let* ((default-directory (file-truename (expand-file-name dir)))
|
||||
(project-root (doom-project-root default-directory))
|
||||
(projectile-project-root default-directory)
|
||||
(projectile-project-root (doom-project-root default-directory))
|
||||
(projectile-enable-caching projectile-enable-caching))
|
||||
(cond ((and project-root (file-equal-p project-root projectile-project-root))
|
||||
(unless (doom-project-p projectile-project-root)
|
||||
(cond ((and projectile-project-root (file-equal-p projectile-project-root default-directory))
|
||||
(unless (doom-project-p default-directory)
|
||||
;; Disable caching if this is not a real project; caching
|
||||
;; non-projects easily has the potential to inflate the projectile
|
||||
;; cache beyond reason.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue