]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix handling of relative directories in "--init-directory=DIR"
authorEli Zaretskii <eliz@gnu.org>
Sat, 3 Dec 2022 10:21:00 +0000 (12:21 +0200)
committerEli Zaretskii <eliz@gnu.org>
Sat, 3 Dec 2022 10:21:00 +0000 (12:21 +0200)
* lisp/startup.el (command-line): Interpret non-absolute file
names in '--init-directory' relative to the directory from
which Emacs is started.  (Bug#59795)

lisp/startup.el

index d985d57d3c7a61f4a1e1d3faad4dfb755c32e5a7..6270de2ace69ab881798ff2afc731179d6db5835 100644 (file)
@@ -1261,7 +1261,9 @@ please check its value")
          (setq user-emacs-directory (or argval (pop args))
                 user-emacs-directory (if (stringp user-emacs-directory)
                                          (file-name-as-directory
-                                          user-emacs-directory)
+                                          (expand-file-name
+                                           user-emacs-directory
+                                           command-line-default-directory))
                                        user-emacs-directory)
                 argval nil))
         ((member argi '("-u" "-user"))