Bug 368999 - Folders ending with a space in their name are not retrieved from Folder View
Summary: Folders ending with a space in their name are not retrieved from Folder View
Status: RESOLVED UPSTREAM
Alias: None
Product: plasmashell
Classification: Plasma
Component: Folder (show other bugs)
Version: 5.6.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: 1.0
Assignee: Eike Hein
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-18 17:02 UTC by kyklops
Modified: 2017-02-23 22:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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)