;; 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)))))