From eddaae40e84b5eb1f0136aaba23d918f71b6a986 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Fri, 28 Jan 2022 20:57:09 +0100 Subject: [PATCH] fix: empty HOME on Windows This was accidentally removed in 68d8364. Amend: 68d8364aeaf9 --- core/core.el | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/core.el b/core/core.el index 40eaca49c..493e9c0e6 100644 --- a/core/core.el +++ b/core/core.el @@ -53,6 +53,13 @@ envvar will enable this at startup.") (defconst IS-WINDOWS (memq system-type '(cygwin windows-nt ms-dos))) (defconst IS-BSD (or IS-MAC (eq system-type 'berkeley-unix))) +(when-let (realhome + (and IS-WINDOWS + (null (getenv-internal "HOME")) + (getenv "USERPROFILE"))) + (setenv "HOME" realhome) + (setq abbreviated-home-dir nil)) + ;; ;;; Directory variables