Let Emacs start even if curdir is inaccessible
* lisp/startup.el (normal-top-level): Also delete PWD if file-attributes fails for either $PWD or default-directory, instead of failing out of the top level. This fixes a regression from Emacs 26 (Bug#42903).
This commit is contained in:
parent
dd989c0ea0
commit
362ca83a3b
1 changed files with 6 additions and 5 deletions
|
@ -649,11 +649,12 @@ It is the default value of the variable `top-level'."
|
|||
;; Use FOO/., so that if FOO is a symlink, file-attributes
|
||||
;; describes the directory linked to, not FOO itself.
|
||||
(or (and default-directory
|
||||
(equal (file-attributes
|
||||
(concat (file-name-as-directory pwd) "."))
|
||||
(file-attributes
|
||||
(concat (file-name-as-directory default-directory)
|
||||
"."))))
|
||||
(ignore-errors
|
||||
(equal (file-attributes
|
||||
(concat (file-name-as-directory pwd) "."))
|
||||
(file-attributes
|
||||
(concat (file-name-as-directory default-directory)
|
||||
".")))))
|
||||
(setq process-environment
|
||||
(delete (concat "PWD=" pwd)
|
||||
process-environment)))))
|
||||
|
|
Loading…
Add table
Reference in a new issue