Skip to content

Fix Windows file URIs against their own drive - #712

Merged
dakra merged 2 commits into
dakra:mainfrom
kiennq:fix/windows-file-uri-links
Sep 27, 2026
Merged

dakra merged 2 commits into
dakra:mainfrom
kiennq:fix/windows-file-uri-links

Conversation

@kiennq

@kiennq kiennq commented Sep 26, 2026 •

Copy link
Copy Markdown
Contributor

Currently on Windows, the file:///C:/data/file.txt will not be resolved correctly. It got resolved to <current-drive>:/c:/data/file.txt.
That's not correct according to RFC8089, this change fixed that.

kiennq and others added 2 commits September 25, 2026 21:46
ghostel--open-link handles every file://HOST/PATH URI itself: the
path is percent-decoded as UTF-8, a local host opens the file directly
and any other host opens it over TRAMP.  Like fileref: links, all file
links open in another window.  The file:/PATH form without an
authority is not handled, and `?' and `#' stay part of the file name.

TRAMP name construction and URI path decoding move out of
ghostel--update-directory into ghostel--tramp-path and
ghostel--file-uri-decode, shared by OSC 7 and links.
@dakra
dakra merged commit c0d3490 into dakra:main Sep 27, 2026
30 checks passed
@dakra

dakra commented Sep 27, 2026

Copy link
Copy Markdown
Owner

Thanks.

This branch was successfully deployed

1 active deployment
github-pages — c0d34900 Deployed Sep 27, 2026 by dakra via deploy #205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants