Bug 372813

Summary: "Invalid protocol" message on tilde (~) prefixed non-existent directory
Product: [Frameworks and Libraries] frameworks-kio Reporter: Gregor Mi <codestruct>
Component: generalAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal CC: bugseforuns, elvis.angelaccio, kde, kdelibs-bugs, simonandric5
Priority: NOR    
Version: 5.37.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 5.42

Description Gregor Mi 2016-11-22 21:37:47 UTC
SETUP:
In my home directory there is a tmp folder (~/tmp).

ACTION:
When I paste the existing path "~/tmp" (without the quotes) to the address bar and hit Enter, dolphin navigates to the address. Which is fine.

When I paste a non-existing path "~/tmp/nonext" (without the quotes) to the address bar and hit Enter, dolphin shows the "Invalid protocol" message. This is confusing because it only happens when the path is prefixed with the tilde.

EXPECTED:
Dolphin should show the "The file or folder ... does not exist." message as it does when the non-existing path "/home/g/tmp/nonext" (without tilde) is entered.
Comment 1 Elvis Angelaccio 2016-11-23 10:21:10 UTC
Hi Gregor, I can reproduce but I think the bug might be in KIO
Comment 2 Kai Uwe Broulik 2017-08-18 08:45:43 UTC
The bug lies in KUrlNavigator. While KUrlCompletion in the combobox does tilde expansion, the uncomittedUrl() which is used when pressing enter does not. This results in an invalid URL ending up in Dolphin which rightfully complains. Re-assigning to KIO.

One could slam a KShell::tildeExpand in there somewhere but I have no idea how KUriFilter works and when to do that, ie. before filterUri or afterwards.
Comment 3 Dominik Haumann 2017-12-06 21:54:12 UTC
Possible fix: https://phabricator.kde.org/D9217