Bug 365798 - Extraction fails when the filename has a % in it
Summary: Extraction fails when the filename has a % in it
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 16.04.2
Platform: Debian unstable Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-18 03:03 UTC by didi.debian
Modified: 2016-07-21 10:20 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description didi.debian 2016-07-18 03:03:17 UTC
When I right-click in dolphin on a .deb file (ksshaskpass_4%3a5.6.5-1_amd64.deb) and choose "Extract -> Extract archive here, autodetect subfolder", I just get a msg "The following files could not be extracted: <archive>". 
When opening it in ark, it shows its contents and when I then choose the Extract button with "Extraction into subfolder" selected (value: ksshaskpass_4%3a5.6.5-1_amd64), it does extract them and create the subfolder, but the files are extracted to the same folder as the .deb file and not in the created subfolder.

When I remove the % in the filename, it all works as expected.
I tried this both on a zip file and the mentioned .deb file.
Comment 1 Elvis Angelaccio 2016-07-18 12:42:34 UTC
I can reproduce the issue, thanks for reporting!
Comment 2 Elvis Angelaccio 2016-07-21 10:16:12 UTC
Git commit c98d64bfb5176d03f37ae5bed9b1fe8d9d5bbbc2 by Elvis Angelaccio.
Committed on 21/07/2016 at 10:11.
Pushed by elvisangelaccio into branch 'Applications/16.08'.

Fix extraction when an archive has a percentage in the name

QUrl::toDisplayString() results in a QString containing %25 instead of %.
This affects both batch extractions and normal extractions from the Ark Part.

Porting to QUrl::toLocalFile() fixes this issue.
FIXED-IN: 16.08.0

Differential Revision: D2229

M  +3    -3    app/batchextract.cpp
M  +1    -0    autotests/CMakeLists.txt
A  +9    -0    autotests/app/CMakeLists.txt
A  +94   -0    autotests/app/batchextracttest.cpp     [License: BSD]
A  +-    --    autotests/app/data/simple%archive.tar.gz
M  +1    -1    part/part.cpp

http://commits.kde.org/ark/c98d64bfb5176d03f37ae5bed9b1fe8d9d5bbbc2
Comment 3 Elvis Angelaccio 2016-07-21 10:20:51 UTC
Git commit 14c75187ca6ed11544ff005267770f4fcd88e27f by Elvis Angelaccio.
Committed on 21/07/2016 at 10:18.
Pushed by elvisangelaccio into branch 'Applications/16.08'.

Fix AddToArchive jobs when filenames have a percentage character

Differential Revision: D2230

M  +7    -0    autotests/kerfuffle/addtoarchivetest.cpp
A  +1    -0    autotests/kerfuffle/data/test%dir/testfile1.txt
A  +1    -0    autotests/kerfuffle/data/test%dir/testfile2.txt
M  +3    -3    kerfuffle/addtoarchive.cpp

http://commits.kde.org/ark/14c75187ca6ed11544ff005267770f4fcd88e27f