From 401f76cc3d6210dd546bbb22f2ae60d529e59fbe Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 3 Dec 2022 12:03:13 +0200 Subject: [PATCH] Make sure 'user-emacs-directory' ends in a slash * lisp/startup.el (command-line): Make sure 'user-emacs-directory' has the form of a directory. --- lisp/startup.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/startup.el b/lisp/startup.el index 5e0a47d3f8f..d985d57d3c7 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -1259,6 +1259,10 @@ please check its value") (setq init-file-user nil)) ((member argi '("-init-directory")) (setq user-emacs-directory (or argval (pop args)) + user-emacs-directory (if (stringp user-emacs-directory) + (file-name-as-directory + user-emacs-directory) + user-emacs-directory) argval nil)) ((member argi '("-u" "-user")) (setq init-file-user (or argval (pop args)) -- 2.39.2