Bug 2050 - Gnumeric file recognized as application/x-font-tex-tfm
Summary: Gnumeric file recognized as application/x-font-tex-tfm
Status: RESOLVED FIXED
Alias: None
Product: shared-mime-info
Classification: Unclassified
Component: freedesktop.org.xml (show other bugs)
Version: unspecified
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Jonathan Blandford
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-10 07:16 UTC by Marco Pesenti Gritti
Modified: 2005-04-15 20:05 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
testcase (3.44 KB, patch)
2004-12-10 07:17 UTC, Marco Pesenti Gritti
Details | Splinter Review

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.