Bug 2050

Summary: Gnumeric file recognized as application/x-font-tex-tfm
Product: shared-mime-info Reporter: Marco Pesenti Gritti <mpgritti>
Component: freedesktop.org.xmlAssignee: Jonathan Blandford <jrb>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: high    
Version: unspecified   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: testcase

Description Marco Pesenti Gritti 2004-12-10 07:16:38 UTC
I'm going to attach a testcase
Comment 1 Marco Pesenti Gritti 2004-12-10 07:17:45 UTC
Created attachment 1507 [details] [review]
testcase

To reproduce just look at this file properties in nautilus.
Comment 2 Christophe Fergeau 2005-04-16 08:00:00 UTC
This looks like a bug in xdgmime :-/
1st bytes of the file :
 1f 8b 08 00 12 12 86 40 
the gzip magic pattern looks for \037\213 (ie 0x1f 0x8b)
the x-font-tex-tfm magic patterns are:
\367\203 (0xf7 0x83)
\367\131 (0xf7 0x59)
\367\312 (0xf7 0xca)
and they match at offset 0...
Comment 3 Christophe Fergeau 2005-04-16 12:48:55 UTC
Hrm, looked at the wrong entry for  application/x-font-tex-tfm
The corret entry is:
  <mime-type type="application/x-font-tex-tfm">
    <_comment>TeX font metrics</_comment>
    <magic priority="50">
      <match type="string" value="\000\021" offset="2"/>
      <match type="string" value="\000\022" offset="2"/>
    </magic>
  </mime-type>

\000\021 is 0x00 0x11
\000\022 is 0x00 0x12 
The latter one matches the attached file... at offset 2
Comment 4 Christophe Fergeau 2005-04-16 12:49:44 UTC
Err, it matches at offset 3 rather
Comment 5 Christophe Fergeau 2005-04-16 13:05:59 UTC
Fixed in xdgmime CVS.

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.