From 23525a3d1d5b99b6559ed02cfe3d745673d6e446 Mon Sep 17 00:00:00 2001 From: james sangho nah Date: Thu, 21 Jan 2016 22:46:00 +1300 Subject: [PATCH] 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) --- core/core-configuration-layer.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/core-configuration-layer.el b/core/core-configuration-layer.el index 4792488f9..d693d207e 100644 --- a/core/core-configuration-layer.el +++ b/core/core-configuration-layer.el @@ -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