Don’t look in .spacemacs.d/layers if it doesn’t exist

This commit is contained in:
Eivind Fonn 2017-05-29 11:51:57 +02:00
parent fab3b2a4e4
commit 9c9bdf749a
1 changed files with 4 additions and 2 deletions

View File

@ -1128,9 +1128,11 @@ Returns nil if the directory is not a category."
;; layers in private folder ~/.emacs.d/private
(list configuration-layer-private-directory)
;; layers in dotdirectory
;; this path may not exist, so check if it does
(when dotspacemacs-directory
(list (expand-file-name (concat dotspacemacs-directory
"layers/"))))
(let ((dir (expand-file-name (concat dotspacemacs-directory
"layers/"))))
(when (file-exists-p dir) (list dir))))
;; additional layer directories provided by the user
dotspacemacs-configuration-layer-path))
(discovered '()))