From efd0a0abe1956d4a3d0f7ce0eefc2059766e8009 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Sat, 28 Feb 2026 10:42:43 +0200 Subject: Fix duplicate projectile-project-root call in cache-current-file Reuse the already-resolved `current-project` binding instead of calling projectile-project-root a second time. Avoids redundant root resolution and a subtle correctness risk if the two calls returned different values. --- projectile.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projectile.el b/projectile.el index 5a8e2ba..1a4429e 100644 --- a/projectile.el +++ b/projectile.el @@ -1200,7 +1200,7 @@ The cache is created both in memory and on the hard drive." (let ((current-project (projectile-project-root))) (when (and (buffer-file-name) (file-exists-p (buffer-file-name)) - (gethash (projectile-project-root) projectile-projects-cache)) + (gethash current-project projectile-projects-cache)) (let* ((abs-current-file (file-truename (buffer-file-name))) (current-file (file-relative-name abs-current-file current-project))) (unless (or (projectile-file-cached-p current-file current-project) -- cgit v1.0