Bug 462201 - Location bar + sftp ux: when entering absolute path, dolphin navigates to the path via sftp instead of opening it locally
Summary: Location bar + sftp ux: when entering absolute path, dolphin navigates to the...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: bars: location (show other bugs)
Version: 22.08.3
Platform: Arch Linux Linux
: NOR minor
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-24 14:47 UTC by Dmitrii Chermnykh
Modified: 2024-10-23 18:24 UTC (History)
5 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 Dmitrii Chermnykh 2022-11-24 14:47:54 UTC
STEPS TO REPRODUCE
1. Open dolphin and navigate to some path via sftp, for example `sftp://host:port/home/user`
2. Open new tab with ctrl+t (the path of the tab should remain the same)
3. Opoen location bar (e.g. with ctrl+L shortcut) and enter some path on local host, (`/var/tmp` in my case)

OBSERVED RESULT
Dolphin opens folder `/var/tmp` on the remote host

EXPECTED RESULT
Two options:
1. Dolphin opens `/var/tmp` on local folder because `sftp://host:port` was not specified in the location
2. Dolphin shows `sftp://host:port` before the navigation bar showing that the navigation is going to be relative to the remote host

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 5.26.3
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7+kde+r175-1
Comment 1 ratijas 2022-11-24 14:58:26 UTC
Can confirm this bug. What's worse, Location Bar's completions menu (drop-down suggestion list) shows folders from local file system.

Also I found that Dolphin only opens remove (sftp:) location when requested folder actually exists on remote. Otherwise it opens local folder.

> 2. Dolphin shows `sftp://host:port` before the navigation bar showing that the navigation is going to be relative to the remote host

Such thing exists in Dolphin, it shows up if you clear all text in Location Bar. It's just not showing up for sftp: until you clear all text, for some reason.

Might be somehow related to https://bugs.kde.org/show_bug.cgi?id=460097, which indicates that Location Bar does not clear some of its state on Enter.
Comment 2 Dmitrii Chermnykh 2022-11-24 15:16:15 UTC
Additional info:
I have archlinux package  kio-fuse 5.0.1-1 installed
Comment 3 Felix Ernst 2022-12-30 14:15:51 UTC
I think this was fixed by https://invent.kde.org/frameworks/kio/-/commit/a3293633ea855e4be9092fa4b74db978cfc5ac99, but that commit should have made it into KF 5.100. So something doesn't line up here.

It would be interesting to know if this is still an issue with KF 5.101.
Comment 4 Dmitrii Chermnykh 2022-12-30 15:05:32 UTC
(In reply to Felix Ernst from comment #3)
> I think this was fixed by
> https://invent.kde.org/frameworks/kio/-/commit/
> a3293633ea855e4be9092fa4b74db978cfc5ac99, but that commit should have made
> it into KF 5.100. So something doesn't line up here.
> 
> It would be interesting to know if this is still an issue with KF 5.101.

For me it still reproduces with kf 5.101
Comment 5 Felix Ernst 2022-12-30 17:03:39 UTC
Alright, so this issue is separate from the one I linked.

>> 2. Dolphin shows `sftp://host:port` before the navigation bar showing
>>that the navigation is going to be relative to the remote host
>Such thing exists in Dolphin, it shows up if you clear all text in Location Bar.
>It's just not showing up for sftp: until you clear all text, for some reason.

In my testing, when focusing the path in the location bar that path visibly contains the protocol (i.e. "stfp:" in sftp://host:port/home/user) initially. The confusing part is probably that that protocol is still used even after clearing the text input.

So I assume the best solution here would be to show the protocol dropdown button in front of the path not only when the text input is completely empty, but also if the protocol scheme (in this case "sftp") has been deleted from the text input field since the last time the url has been commited (e.g. by pressing "Enter").
Comment 6 Dmitrii Chermnykh 2022-12-30 17:55:42 UTC
(In reply to Felix Ernst from comment #5)
> Alright, so this issue is separate from the one I linked.
> 
> >> 2. Dolphin shows `sftp://host:port` before the navigation bar showing
> >>that the navigation is going to be relative to the remote host
> >Such thing exists in Dolphin, it shows up if you clear all text in Location Bar.
> >It's just not showing up for sftp: until you clear all text, for some reason.
> 
> In my testing, when focusing the path in the location bar that path visibly
> contains the protocol (i.e. "stfp:" in sftp://host:port/home/user)
> initially. The confusing part is probably that that protocol is still used
> even after clearing the text input.
> 

Currently, in a windows with `sftp://host/home/user` if I start typing `/home` it'll autocomplete the local (not sftp) path (as absolute path for local directories) but navigate to the remote path (which may not even exist)
Comment 7 Luca Weiss 2024-10-23 18:24:26 UTC
I see the same behavior with dolphin 24.08.2 & kio 6.7.0. Both navigation behavior (e.g. entering /tmp I'd expect to land on *my* computer's /tmp and not sftp://my-remote/tmp) and auto completion (always suggesting local paths even if it'd navigate to the remote path) have unexpected behavior in my eyes.