fix: args-out-of-range when cleaning project cache

Caused when the key of a cached project is an empty string.

Fix #5345
This commit is contained in:
Henrik Lissner 2021-08-06 03:11:55 -04:00
parent ce31880ccc
commit 1352f8a9aa

View file

@ -126,6 +126,7 @@ c) are not valid projectile projects."
(cl-loop with blacklist = (mapcar #'file-truename doom-projectile-cache-blacklist)
for proot in (hash-table-keys projectile-projects-cache)
if (or (not (stringp proot))
(string-empty-p proot)
(>= (length (gethash proot projectile-projects-cache))
doom-projectile-cache-limit)
(member (substring proot 0 -1) blacklist)