Bug 353799 - KRun chokes on KFileItem::targetUrl() for filenames containing #
Summary: KRun chokes on KFileItem::targetUrl() for filenames containing #
Status: RESOLVED FIXED
Alias: None
Product: kio
Classification: Unmaintained
Component: general (other bugs)
Version First Reported In: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL: http://i.imgur.com/PAeDor9.png
Keywords:
Depends on:
Blocks:
 
Reported: 2015-10-11 17:43 UTC by Leonardo da Silva
Modified: 2018-04-24 21:23 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Leonardo da Silva 2015-10-11 17:43:17 UTC
won't open file names containing hash #
if filename  in desktop is: [#GNU]archive.txt
double click in "desktop icon", display this dialog message: http://i.imgur.com/PAeDor9.png
dolphin: "this bug not work "

Reproducible: Always

Steps to Reproduce:
1. enable desktop icons in plasma shell
2. create a file in desktop with name [#GNU]archive.txt
3. try open.
Comment 1 Eike Hein 2015-10-13 18:31:15 UTC
David, can you please comment on how to handle this best? Handing KFileItem::localPath to QUrl::fromLocalFile isn't an acceptable workaround because KFileItem::isLocalFile may not be true, either (e.g. it currently fails for desktop:/).
Comment 2 David Faure 2015-10-17 12:54:40 UTC
Eike, does this mean you have located the faulty code? A basic test of the KRun ctor with a local file with # in the path works (I added a '#' to the filename in KRunUnitTest::testMimeTypeFile).

(I don't use Plasma5 yet, resizing a window makes Xorg crash too often)
Comment 3 Eike Hein 2015-10-18 16:18:06 UTC
^ No, I've only printed the QUrl being handed to KRun: QUrl("file:///home/sho/Desktop/[#GNU]archive.txt")

Subsequently I tried QUrl::fromLocalFile on KFileItem::localPath to construct the URL, but with identical results + KFileItem::isLocalFile isn't always reliable.
Comment 4 Nate Graham 2018-04-24 21:23:20 UTC
Opening a file on the desktop called "[#GNU]archive.txt" works fine for me in KDE Frameworks 5.45 and Plasma 5.12.4.

If anyone can reproduce with recent versions of the software, please re-open.