aboutsummaryrefslogtreecommitdiff
path: root/projectile.el
diff options
context:
space:
mode:
authorBozhidar Batsov <bozhidar@batsov.dev>2026-02-28 08:38:59 +0200
committerBozhidar Batsov <bozhidar@batsov.dev>2026-02-28 08:54:10 +0200
commit844129c080a01f6807ec9ca2acd415b5f196bef1 (patch)
treebef15e88795ffcc03a4d2f88f1e53a8019b8c374 /projectile.el
parentf12fdae30a36e3614fa6944969bf37dec9998301 (diff)
Fix projectile-purge-file-from-cache serializing stale data
The function was serializing the original file list to disk instead of the updated list with the file removed. This meant purged files would reappear in the cache after restarting Emacs.
Diffstat (limited to 'projectile.el')
-rw-r--r--projectile.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/projectile.el b/projectile.el
index f6b7e63..bbcddcf 100644
--- a/projectile.el
+++ b/projectile.el
@@ -1159,10 +1159,10 @@ The cache is created both in memory and on the hard drive."
(let* ((project-root (projectile-project-root))
(project-cache (gethash project-root projectile-projects-cache)))
(if (projectile-file-cached-p file project-root)
- (progn
- (puthash project-root (remove file project-cache) projectile-projects-cache)
+ (let ((new-cache (remove file project-cache)))
+ (puthash project-root new-cache projectile-projects-cache)
(when (projectile-persistent-cache-p)
- (projectile-serialize project-cache (projectile-project-cache-file project-root)))
+ (projectile-serialize new-cache (projectile-project-cache-file project-root)))
(when projectile-verbose
(message "%s removed from cache" file)))
(error "%s is not in the cache" file))))