Bug 101170

Summary: autodetect or suggest archive type
Product: [Applications] ark Reporter: Helge Hielscher <hhielscher>
Component: generalAssignee: Ragnar Thomsen <rthomsen6>
Status: RESOLVED FIXED    
Severity: wishlist CC: cauldert, rakuco, rthomsen6, simonandric5
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In: 15.08.1
Sentry Crash Report:

Description Helge Hielscher 2005-03-09 12:30:14 UTC
Version:           2.4.0 (using KDE KDE 3.3.2)
Installed from:    Mandrake RPMs

It is getting more common that applications store there data in compressed files, but do not use an extension that is common for archives and are often not known by ark.
If I open such a file, I get asked what kind of archive it is. 
What I want ark to do is: 
1) check the archive format automatically using the file command or a similar method
2) in the dialog preselect the archive format to what is most likely
3) a checkbox "remember the filetype if this file can be opened sucessfully"
Comment 1 Helge Hielscher 2007-05-21 11:44:52 UTC
*** This bug has been confirmed by popular vote. ***
Comment 2 Harald Hvaal 2008-08-16 09:42:59 UTC
With r847739 kde4 ark looks at file content to figure out mime type. This partly fulfills this wishlist item.
Comment 3 Raphael Kubo da Costa 2009-05-27 08:20:04 UTC
*** Bug 132550 has been marked as a duplicate of this bug. ***
Comment 4 Raphael Kubo da Costa 2010-12-08 02:14:31 UTC
Changing the default assignee for currently open Ark bug reports to me.
Comment 5 Ragnar Thomsen 2015-09-10 06:39:30 UTC
Git commit d3d3e5928b56db8446bac42ea334d940a3b7b37b by Ragnar Thomsen.
Committed on 10/09/2015 at 06:39.
Pushed by rthomsen into branch 'Applications/15.08'.

Improve detection of mimetype when opening archive

Previously, the filename extension had higher priority than file content
when determining mimetype. When opening an archive that had a wrong
extension (as in bug 265971), this resulted in Ark failing to open it.
With this commit the mimetype is determined from file content.
Additionally, a warning is shown in console output when mimetype from
extension and content do not match.

For tar.gz, tar.bz2 and tar.xz archives, the mimetype from filename
extension is still used. This is due to these archives being detected as
singlefile gz, bz2 and xz archives when using content, and Ark would
then use the singlefileplugin instead of the libarchive plugin.
Related: bug 265971
FIXED-IN: 15.08.1
REVIEW: 124442

M  +24   -6    kerfuffle/archive_kerfuffle.cpp

http://commits.kde.org/ark/d3d3e5928b56db8446bac42ea334d940a3b7b37b