Bug 388922 - Clicking arrow beside samba share expands them all on top level
Summary: Clicking arrow beside samba share expands them all on top level
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: view-engine: details mode (show other bugs)
Version: 19.12.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-13 18:10 UTC by ikidd3123
Modified: 2020-02-07 14:01 UTC (History)
3 users (show)

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


Attachments
Screencap (600.83 KB, video/mp4)
2018-01-13 18:10 UTC, ikidd3123
Details

Note You need to log in before you can comment on or make changes to this bug.
Description ikidd3123 2018-01-13 18:10:07 UTC
Created attachment 109844 [details]
Screencap

Clicking the arrow next to a windows server top level share opens all shares available into the top level of the panel view instead of under the share heading.

https://imgur.com/a/MrKKF
Comment 1 Harald Sitter 2020-02-07 14:01:36 UTC
This is a bug in KFileItemModel::index. It fails to map the expanded URLs to their parent when that parent was originally listed without trailing slash.

e.g listDir of smb gives out `smb://ajax.local` and its children will be `smb://ajax.local/Public`.

::index tries to mitigate this by stripping the trailing slash
> const QUrl urlToFind = url.adjusted(QUrl::StripTrailingSlash);
I am guessing this is noop for smb://ajax.local/ because that slash is technically not trailing but denotes the root.

> dolphin(16343)/(default) KFileItemModel::index: urlToFind QUrl("smb://ajax.local/")
> dolphin(16343)/(default) KFileItemModel::index: items QHash((QUrl("smb://ajax.local"), 0)(QUrl("smb://ubuntu.local"), 1))

This may well be a bug in QUrl because those urls really should be considered equal, but their may be nuances I'm not aware of. I seem to remember something about scheme-dependent path defaults, which I guess would make "" not necessarily == "/"