Bug 407671

Summary: Folder View applet fails to browse folders whose names end with a space
Product: [Plasma] plasmashell Reporter: AndyKluger
Component: Desktop icons & Folder View widgetAssignee: Eike Hein <hein>
Status: RESOLVED FIXED    
Severity: normal CC: AndyKluger, kde, nate, plasma-bugs-null
Priority: NOR Keywords: usability
Version First Reported In: 5.15.5   
Target Milestone: 1.0   
Platform: Other   
OS: Linux   
URL: https://bugreports.qt.io/browse/QTBUG-81643
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:

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.