Resolve symlinks when warning about duplicate layers

This allows the user to, for instance, include the spacemacs tree as a
git submodule of their configuration repository without seeing
superfluous warnings.
This commit is contained in:
Ben Gamari 2016-11-14 08:45:58 -05:00 committed by Eivind Fonn
parent dfa18dafc3
commit 1320f8e8fa
1 changed files with 4 additions and 3 deletions

View File

@ -1170,9 +1170,10 @@ Returns nil if the directory is not a category."
(if indexed-layer
;; the same layer may have been discovered twice,
;; in which case we don't need a warning
(unless (string-equal
(directory-file-name (oref indexed-layer :dir))
(directory-file-name sub))
(unless (string-equal (file-truename
(directory-file-name (oref indexed-layer :dir)))
(file-truename
(directory-file-name sub)))
(configuration-layer//warning
(concat
"Duplicated layer %s detected in directory \"%s\", "