Remove non-directories from rollback slot list

Addressing #4586. The bug stops Spacemacs from listing rollback slots if
there exists a file (i.e. non-directory) in the rollback directory.
e.g. .emacs.d/.cache/.rollback/.DS_Store (common in OS X)
This commit is contained in:
james sangho nah 2016-01-21 22:46:00 +13:00 committed by Eivind Fonn
parent 7b06611cdb
commit 23525a3d1d
1 changed files with 2 additions and 1 deletions

View File

@ -996,7 +996,8 @@ If called with a prefix argument ALWAYS-UPDATE, assume yes to update."
(reverse
(delq nil (mapcar
(lambda (x)
(when (not (or (string= "." x) (string= ".." x)))
(when (and (file-directory-p (concat rolldir x))
(not (or (string= "." x) (string= ".." x))))
(let ((p (length (directory-files (file-name-as-directory
(concat rolldir x))))))
;; -3 for . .. and rollback-info