Expand file names read from XDS functions

* lisp/x-dnd.el (x-dnd-handle-xds-drop): Expand file names
before use.  Some GUI dialogs read un-expanded file names.
This commit is contained in:
Po Lu 2022-07-01 16:32:37 +08:00
parent b55059bbeb
commit 06cd24698e

View file

@ -1369,8 +1369,9 @@ VERSION is the version of the XDND protocol understood by SOURCE."
desired-name
(or file-name-coding-system
default-file-name-coding-system)))
(setq save-to (funcall x-dnd-direct-save-function
t desired-name))
(setq save-to (expand-file-name
(funcall x-dnd-direct-save-function
t desired-name)))
(when save-to
(with-selected-window window
(let ((uri (format "file://%s%s" (system-name) save-to)))