Append slash to DOOMLOCALDIR & DOOMDIR

If needed.
This commit is contained in:
Henrik Lissner 2019-10-29 22:36:51 -04:00
parent 1d09e4655a
commit 63dfd298ca
No known key found for this signature in database
GPG key ID: 5F6C0EA160557395

View file

@ -53,8 +53,9 @@ decrease this. If you experience stuttering, increase this.")
"The root directory for Doom's modules. Must end with a slash.") "The root directory for Doom's modules. Must end with a slash.")
(defvar doom-local-dir (defvar doom-local-dir
(or (getenv "DOOMLOCALDIR") (if-let (localdir (getenv "DOOMLOCALDIR"))
(concat doom-emacs-dir ".local/")) (file-name-as-directory localdir)
(concat doom-emacs-dir ".local/"))
"Root directory for local storage. "Root directory for local storage.
Use this as a storage location for this system's installation of Doom Emacs. Use this as a storage location for this system's installation of Doom Emacs.
@ -76,13 +77,14 @@ Use this for files that change often, like cache files. Must end with a slash.")
"Where Doom's documentation files are stored. Must end with a slash.") "Where Doom's documentation files are stored. Must end with a slash.")
(defvar doom-private-dir (defvar doom-private-dir
(or (getenv "DOOMDIR") (if-let (doomdir (getenv "DOOMDIR"))
(let ((xdg-path (file-name-as-directory doomdir)
(expand-file-name "doom/" (or (let ((xdgdir
(or (getenv "XDG_CONFIG_HOME") (expand-file-name "doom/"
"~/.config")))) (or (getenv "XDG_CONFIG_HOME")
(if (file-directory-p xdg-path) xdg-path)) "~/.config"))))
"~/.doom.d/") (if (file-directory-p xdgdir) xdgdir))
"~/.doom.d/"))
"Where your private configuration is placed. "Where your private configuration is placed.
Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar; Defaults to ~/.config/doom, ~/.doom.d or the value of the DOOMDIR envvar;