Ensure that default-directory is a directory name in EXWM buffers.

Otherwise `default-directory' could be /home/user instead of /home/user/ as is
expected by Emacs.

* exwm-manage.el (exwm-manage--update-default-directory): Use
`file-name-as-directory'.
This commit is contained in:
Daniel Mendler 2024-02-04 22:39:06 +01:00
parent fbc1e81ed6
commit 44e74bcc07
No known key found for this signature in database
GPG key ID: D88ADB2A2693CA43

View file

@ -247,7 +247,7 @@ This only works when procfs is mounted, which may not be the case on some BSDs."
(pid (slot-value response 'value))
(cwd (file-symlink-p (format "/proc/%d/cwd" pid)))
((file-accessible-directory-p cwd)))
(setq default-directory cwd)
(setq default-directory (file-name-as-directory cwd))
(setq default-directory (expand-file-name "~/")))))