mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 06:00:41 -08:00
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
|
;; Use FOO/., so that if FOO is a symlink, file-attributes
|
||||||
;; describes the directory linked to, not FOO itself.
|
;; describes the directory linked to, not FOO itself.
|
||||||
(or (and default-directory
|
(or (and default-directory
|
||||||
(equal (file-attributes
|
(ignore-errors
|
||||||
(concat (file-name-as-directory pwd) "."))
|
(equal (file-attributes
|
||||||
(file-attributes
|
(concat (file-name-as-directory pwd) "."))
|
||||||
(concat (file-name-as-directory default-directory)
|
(file-attributes
|
||||||
"."))))
|
(concat (file-name-as-directory default-directory)
|
||||||
|
".")))))
|
||||||
(setq process-environment
|
(setq process-environment
|
||||||
(delete (concat "PWD=" pwd)
|
(delete (concat "PWD=" pwd)
|
||||||
process-environment)))))
|
process-environment)))))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue