https://bugs.kde.org/show_bug.cgi?id=483297

--- Comment #3 from Anton <[email protected]> ---
Fixes submitted for review.

Root cause confirmed in KIO, as diagnosed by Ben Morris: modern Qt's
QUrl::isLocalFile() returns true even when a file:// URL carries a host, and
QUrl::toLocalFile() then keeps that host as a UNC-style "//host/path". The file
worker detected the local host (isLocalFileSameHost) but converted the URL to a
path without stripping the host, so e.g. file://localhost/etc became
"//localhost/etc" and failed. Reproducible independently of any terminal:

    $ kioclient stat file://localhost/etc
    The file or folder //localhost/etc does not exist

KIO (the actual fix + autotest):
https://invent.kde.org/frameworks/kio/-/merge_requests/2285
Strips the local host (empty, "localhost", or this machine's hostname, matched
case-insensitively) in all file-worker operations before calling toLocalFile().
Genuine remote hosts are untouched and still redirect to smb://. Adds a jobtest
case for stat() of file://localhost/, file://<hostname>/ and a case-insensitive
host.

Konsole (cleanup):
https://invent.kde.org/utilities/konsole/-/merge_requests/1243
Konsole previously dropped OSC 8 file:// hyperlinks whose host did not exactly
match the local hostname (e.g. the FQDN emitted by `ls --hyperlink`). It now
passes the URL through verbatim and lets KIO resolve the host per RFC 8089.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to