Bug 407671 - Folder View applet fails to browse folders whose names end with a space
Summary: Folder View applet fails to browse folders whose names end with a space
Status: RESOLVED FIXED
Alias: None
Product: plasmashell
Classification: Plasma
Component: Desktop icons & Folder View widget (other bugs)
Version First Reported In: 5.15.5
Platform: Other Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL: https://bugreports.qt.io/browse/QTBUG...
Keywords: usability
Depends on:
Blocks:
 
Reported: 2019-05-17 23:04 UTC by AndyKluger
Modified: 2024-08-16 04:34 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description AndyKluger 2019-05-17 23:04:04 UTC
SUMMARY


STEPS TO REPRODUCE
1. Add Folder View applet to panel
2. Create folder named "endswithspace " within the one viewed by that applet
3. Attempt to browse that folder from the applet

OBSERVED RESULT

"The file or folder <path of 'endswithspace ' but with the whitespace removed> does not exist." is displayed where the contents of that folder should be.

EXPECTED RESULT

The contents of the folder should be displayed. The spaces should not be stripped from the path.

SOFTWARE/OS VERSIONS
Arch Linux
KDE Plasma Version: 5.15.5
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.3
Comment 1 Kai Uwe Broulik 2019-05-23 14:47:13 UTC
It ends up running the url through QUrl::fromUserInput which strips spaces as it is meant for user input in an address bar.

It probably shouldn't use fromUserInput when the URL comes from a trusted source (the model).
Comment 2 Nate Graham 2020-01-23 18:00:43 UTC
There are two bugs here. First of all, the text field doesn't accept input that ends with a space. Second of all, the directory chooser dialog returns incorrect output when told to select a folder whose name that ends with a space.

I've submitted a patch to fix the first issue: https://phabricator.kde.org/D26881

That patch will at least allow manual entry into the text field, even though the directory chooser dialog will still be broken. For that, I've filed https://bugreports.qt.io/browse/QTBUG-81643
Comment 3 Nate Graham 2024-08-16 04:34:28 UTC
Can't reproduce this in git master. Looks like it got fixed somewhere along the way.