Bug 470849 - Completion for path in $HOME works but fails on enter
Summary: Completion for path in $HOME works but fails on enter
Status: REPORTED
Alias: None
Product: dolphin
Classification: Applications
Component: bars: location (show other bugs)
Version: 23.04.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-09 21:43 UTC by gudvinr+kde
Modified: 2023-10-30 07:02 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description gudvinr+kde 2023-06-09 21:43:23 UTC
SUMMARY

In Dolphin, when you type in part of the address in your home dir without providing '~', dolphin suggests correct paths (like .local, .config, Downloads, etc) but if you try to use these suggestions, it fails to go there with "Invalid protocol" error if you aren't in home dir already.

STEPS TO REPRODUCE
1. Go to folder other than $HOME
2. Type .con
3. Go to .config/ suggestion

OBSERVED RESULT
.config/ folder is opened

EXPECTED RESULT
"Invalid protocol" error

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.1.32-1-lts (64-bit)
Graphics Platform: X11
Comment 1 Tino Lorenz 2023-10-28 12:43:54 UTC
I investigated this a bit, and it looks like the completion of directories in $HOME was never intended.
Normally, the path in the editor is absolute and completion works. If you delete the prefix and it isn't anymore, things break:
The component offering completion suggestions (KUrlCompletion) falls back to $HOME.
The line editor itself (KUrlComboBox) tries to look for the entered path in the current working directory. If it can't find it there, it makes it into a QUrl, which in turn defaults to the http protocol.
This also means typing in a path in the current working directory works, but isn't autocompleted.
Comment 2 gudvinr+kde 2023-10-30 07:02:57 UTC
I'd rather have it working than not to have it at all tbh. But it's better to not have it at all than having it broken.