Bug 101170 - autodetect or suggest archive type
Summary: autodetect or suggest archive type
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Mandrake RPMs Linux
: NOR wishlist
Target Milestone: ---
Assignee: Ragnar Thomsen
URL:
Keywords:
: 132550 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-03-09 12:30 UTC by Helge Hielscher
Modified: 2015-11-09 00:47 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In: 15.08.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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