For instance, when setting one's SDDM wallpaper, the dialog is opened. If you copy the location of an image and then paste that into the Location bar, it errors out saying that it is a file. I believe it should instead show the directory of the file and, perhaps, highlight the file.
STEPS TO REPRODUCE
1. Find an image to use (I downloaded one from Get New Wallpapers...)
2. Right-click on the image and copy the location
3. Go to the wallpaper changer for SDDM in System Settings
4. Open the dialog and the location into the Location Bar
The file picker errors out and complains about a folder being expected.
The file picker shows the parent folder of the file and selects the specified file, ready to open that as the chosen file.
Linux/KDE Plasma: Neon
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6
I noticed that the Location bar automatically appends '/' to the end of the location supplied. E.g. /path/to/image.png became /path/to/image.png/
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1090
Git commit ed569eccd4a7dffc737a64beb878b0588dba98e7 by Fushan Wen.
Committed on 31/12/2022 at 14:00.
Pushed by fusionfuture into branch 'master'.
kdiroperator: fix full file path not being stripped
QDir::isReadable always returns true for an unknown path if the
parent folder is readable, so use QFileInfo::isReadable instead.
Need to use QUrl::StripTrailingSlash and QUrl::RemoveFilename separately
since in QUrlPrivate::appendPath, QUrl::RemoveFilename is done before
M +22 -0 autotests/kdiroperatortest.cpp
M +8 -2 src/filewidgets/kdiroperator.cpp