Bug 372813 - "Invalid protocol" message on tilde (~) prefixed non-existent directory
Summary: "Invalid protocol" message on tilde (~) prefixed non-existent directory
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.37.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-11-22 21:37 UTC by Gregor Mi
Modified: 2018-04-07 11:07 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.42
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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