1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-04-30 10:11:47 -07:00

* lisp/desktop.el: Fix the recent cleanup.

(desktop-read): Use 'file-name-directory' on the file name
returned by 'locate-file'.
This commit is contained in:
Juri Linkov 2025-04-23 09:51:34 +03:00
parent add8bf000a
commit 89b7e726f1

View file

@ -1313,7 +1313,8 @@ It returns t if a desktop file was loaded, nil otherwise.
;; Else, with a prefix arg, ask for a directory name.
(and ask (read-directory-name "Directory for desktop file: " nil nil t))
;; Otherwise search desktop file in desktop-path.
(locate-file desktop-base-file-name desktop-path)
(when-let* ((file (locate-file desktop-base-file-name desktop-path)))
(file-name-directory file))
;; If not found and `desktop-path' is non-nil, use its first element.
(car desktop-path)
;; Default: .emacs.d.