Bug 341916 - KIO::KRun doesn't escape spaces in passed urls
Summary: KIO::KRun doesn't escape spaces in passed urls
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-15 14:38 UTC by Jan Grulich
Modified: 2018-08-22 19:46 UTC (History)
4 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 Jan Grulich 2014-12-15 14:38:32 UTC
I noticed this when I was trying to fix ark, which was failing when I was trying to extract a file with an empty pace in its name from Dolphin's context menu. When you run "Extract → Extract Archive Here, Autodect Subfolder", then it calls "ark --batch --autodestination --autosubfolder %F" where instead of %F it passes selected archive. When the archive contains a space in its name, it takes it as two separated files, because the space is not escaped. Running the same command from console with the same archive with escaped space works as expected.

I was trying to fix it, but I'm not sure where and how to do it properly, because probably the same problem is in klauncher, where this code is similar.


Reproducible: Always

Steps to Reproduce:
1. Open dolphin 
2. Pickup an archive with a space in its name
3. Open context menu and select Extract → Extract archive here, autodetect subfolder

Actual Results:  
Ark is not able to extract this file and reports that following files could not be extracted and lists the selected file, just devided by an empty space.

Expected Results:  
Ark is able to extract the selected file and doesn't consider it as two separated files.
Comment 1 Maarten De Meyer 2015-05-18 18:51:01 UTC
*** Bug 345140 has been marked as a duplicate of this bug. ***
Comment 2 David Faure 2015-10-04 09:37:26 UTC
I cannot reproduce this. It works here (both in dolphin4 and dolphin5).

I renamed a zip file to "some images.zip" and it creates a "some images" subdir with all the files in it.
Comment 3 David Faure 2015-10-04 11:02:49 UTC
Git commit d33c876f26d526d6e014d732658f21a903c3adff by David Faure.
Committed on 04/10/2015 at 11:02.
Pushed by dfaure into branch 'master'.

Add autotest to prove that KRun handles spaces in urls just fine

Change-Id: I4d5ad337377c8307631547bfaf16fcbb339e80f3

M  +3    -3    autotests/krununittest.cpp

http://commits.kde.org/kio/d33c876f26d526d6e014d732658f21a903c3adff