]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix running on MS-Windows with non-existing home directory
authorEli Zaretskii <eliz@gnu.org>
Sat, 28 Sep 2019 07:25:08 +0000 (10:25 +0300)
committerEli Zaretskii <eliz@gnu.org>
Sat, 28 Sep 2019 07:25:08 +0000 (10:25 +0300)
* lisp/startup.el (startup--xdg-or-homedot): Don't access a
non-existent user home directory on windows-nt systems.
(Bug#37536)

lisp/startup.el

index 6e2094d678c351871c615f3f930a7bb52f71b959..863e9aed16d8636d2ca6a2ae9382028f1fc139ec 100644 (file)
@@ -510,8 +510,9 @@ DIRS are relative."
                                 "/.emacs.d/"))))
       (if (or (file-exists-p emacs-d-dir)
              (if (eq system-type 'windows-nt)
-                 (directory-files (concat "~" user-name) nil
-                                  "\\`[._]emacs\\(\\.elc?\\)?\\'")
+                  (if (file-directory-p (concat "~" user-name))
+                      (directory-files (concat "~" user-name) nil
+                                       "\\`[._]emacs\\(\\.elc?\\)?\\'"))
                (file-exists-p (concat "~" init-file-user
                                       (if (eq system-type 'ms-dos)
                                           "/_emacs"