Bug 328815

Summary: Tar archives are not detected if they have a wrong extension
Product: [Applications] ark Reporter: illumilore <illumilore>
Component: generalAssignee: Raphael Kubo da Costa <rakuco>
Status: RESOLVED FIXED    
Severity: normal CC: elvis.angelaccio
Priority: NOR    
Version: 2.19   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In: 15.08.3

Description illumilore 2013-12-14 22:05:13 UTC
when a file name has a name such as test.tar.gz, ark will open it, but if the file has a name such as test.tar~1.gz, ark will not be able to open it.

Reproducible: Always
Comment 1 Elvis Angelaccio 2015-10-19 14:29:06 UTC
Confirming. Actually Ark 15.08.02 does open it, but the archive is detected as .gz and the singlefile plugin is used. I'm rewriting the title of the bug.
Comment 2 Elvis Angelaccio 2015-10-21 17:24:55 UTC
Git commit 9e1607559db2e25aa3d3fecb9fe0dd1ca16dbc01 by Elvis Angelaccio.
Committed on 21/10/2015 at 17:18.
Pushed by elvisangelaccio into branch 'Applications/15.08'.

Fix opening of compressed tar archives with special characters in the extension

Compressed tar archives are detected as singlefile
archives when detecting the mimetype by content.
This means that we cannot rely on it to correctly
open such an archive with special characters in
the extension, as we do for the other plugins.
This patch performs input validation on the
filename extension of compressed tar archives.
Non-alpha characters are removed from the extension,
excluding periods, before detecting the mimetype by name.
FIXED-IN: 15.08.3

Differential Revision: D432

M  +15   -2    kerfuffle/archive_kerfuffle.cpp

http://commits.kde.org/ark/9e1607559db2e25aa3d3fecb9fe0dd1ca16dbc01
Comment 3 Elvis Angelaccio 2015-10-22 12:55:31 UTC
Git commit 5a70a0f84517b9738dc2738f50525c979280b686 by Elvis Angelaccio.
Committed on 22/10/2015 at 12:53.
Pushed by elvisangelaccio into branch 'master'.

Add test for special characters in suffix of compressed tar archives

M  +8    -1    kerfuffle/tests/mimetypetest.cpp

http://commits.kde.org/ark/5a70a0f84517b9738dc2738f50525c979280b686