Bug 368999

Summary: Folders ending with a space in their name are not retrieved from Folder View
Product: [Plasma] plasmashell Reporter: kyklops <kyklops>
Component: FolderAssignee: Eike Hein <hein>
Status: RESOLVED UPSTREAM    
Severity: normal CC: faure, plasma-bugs
Priority: NOR    
Version: 5.6.5   
Target Milestone: 1.0   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed In:

Description kyklops 2016-09-18 17:02:57 UTC
Folders ending with a space in their name are not retrieved from Folder View

Reproducible: Always

Steps to Reproduce:
1. Create a folder on your Folder View or Desktop.
2. Rename it including a space as the ending character, e.g. "Test ".
3. Try to open it, e.g. click on it.

Actual Results:  
Dolphin (or any file manager) doesn't open the folder, because it is looking for the folder *without* the ending space in its name.

Expected Results:  
Dolphin opens the folder.
Comment 1 Eike Hein 2016-09-19 10:24:47 UTC
I think this may be a bug in KRun. The QUrl that I hand to KRun includes the space (but no trailing slash), and is then passed the following way:

new KRun(url, 0);

David?
Comment 2 David Faure 2016-09-27 07:50:54 UTC
Bug in QUrl, actually.

    qDebug() << "in:" << urlArg;
    QUrl url = QUrl::fromUserInput(urlArg, QDir::currentPath());
    qDebug() << "out:" << url;

in: "/home/dfaure/bugs/trailing space "
out: QUrl("file:///home/dfaure/bugs/trailing space")

I'll keep digging and I'll fix it in Qt.
Comment 3 David Faure 2017-02-21 14:21:07 UTC
https://codereview.qt-project.org/186246
Comment 4 David Faure 2017-02-23 22:53:52 UTC
The fix is in (for Qt 5.8.1 if there's one, otherwise 5.9)