From: Paul Eggert Date: Mon, 17 Aug 2020 23:21:36 +0000 (-0700) Subject: Let Emacs start even if curdir is inaccessible X-Git-Tag: emacs-27.1.90~183 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=362ca83a3b9d74c51ac325a6490551272aa25f9a;p=emacs.git 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). --- diff --git a/lisp/startup.el b/lisp/startup.el index bff10003f84..364689ccdbf 100644 --- a/lisp/startup.el +++ b/lisp/startup.el @@ -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)))))