1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-17 20:31:56 -07:00

Eglot: Fix parsing file:// URIs on MS-Windows

* lisp/progmodes/eglot.el (eglot-uri-to-path): Remove the leading
slash in MS-Windows file names only if they begin with a slash.
This adjusts the function to the recent fix for bug#76982 in
'url-generic-parse-url', which previously would produce file names
that begin with an extra slash.  (Bug#78392)
This commit is contained in:
Eli Zaretskii 2025-05-13 14:45:04 +03:00
parent 4b4276d64f
commit b3e280faba

View file

@ -1165,7 +1165,8 @@ object."
;; Remove the leading "/" for local MS Windows-style paths.
(normalized (if (and (not remote-prefix)
(eq system-type 'windows-nt)
(cl-plusp (length retval)))
(cl-plusp (length retval))
(eq (aref retval 0) ?/))
(w32-long-file-name (substring retval 1))
retval)))
(concat remote-prefix normalized))