Bug 888

Summary: Mime type of .ICO files is not correct
Product: shared-mime-info Reporter: Archana <archana.shah>
Component: freedesktop.org.xmlAssignee: Jonathan Blandford <jrb>
Status: RESOLVED DUPLICATE QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Archana 2004-07-19 02:40:52 UTC
Click on a .ICO file using file manager. 
See its properties, mime type of the file is defined as application/octet-stream.

Expected:
Its mime type should be image/x-ico.
Comment 1 Archana 2004-07-19 02:47:07 UTC
In freedesktop.org.xml.in file, mime type for .ico is mentioned.  But neither
the Magic string is associated for .ico files, nor .ICO is listed. So the file
system is not able to detect its mime type peroperly. Hence file manager is not
able to open the file.

Adding the Magic string for .ico file resolves the problem. Attaching the patch
which provides the magic string for .ico files.
Comment 2 Archana 2004-07-19 03:01:14 UTC
Here is the Magic string for .ico files:

<magic priority="50">
     <match type="string" value="\x00\x00\x01\x00" offset="0"/>
</magic>
Comment 3 Christophe Fergeau 2004-11-26 14:32:58 UTC
I think the real problem here is bug #732. Archana, your magic pattern would be
a helpful addition, but given its value, I'm afraid of getting too many false
positive with it. I looked http://www.daubnet.com/formats/ICO.html for the ico
file format, and I'm not sure it's really easy to make a more specific magic
pattern :-/
Comment 4 Marco Pesenti Gritti 2004-12-09 14:44:39 UTC
Marking as a dup per teuf comment. Please correct me if this is wrong.

*** This bug has been marked as a duplicate of 732 ***

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.