Fix arrayp error when killing Emacs

Caused by doom|cleanup-project-cache, when a non-string key is present
in projectile-projects-cache (which will be removed).
This commit is contained in:
Henrik Lissner 2019-05-06 17:12:28 -04:00
parent 9402d07228
commit 8e6953b3ac
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -58,8 +58,9 @@ c) are not valid projectile projects."
(when (bound-and-true-p projectile-projects-cache) (when (bound-and-true-p projectile-projects-cache)
(cl-loop with blacklist = (mapcar #'file-truename doom-projectile-cache-blacklist) (cl-loop with blacklist = (mapcar #'file-truename doom-projectile-cache-blacklist)
for proot in (hash-table-keys projectile-projects-cache) for proot in (hash-table-keys projectile-projects-cache)
for len = (length (gethash proot projectile-projects-cache)) if (or (not (stringp proot))
if (or (>= len doom-projectile-cache-limit) (>= (length (gethash proot projectile-projects-cache))
doom-projectile-cache-limit)
(member (substring proot 0 -1) blacklist) (member (substring proot 0 -1) blacklist)
(and doom-projectile-cache-purge-non-projects (and doom-projectile-cache-purge-non-projects
(not (doom-project-p proot)))) (not (doom-project-p proot))))