Bug 21123

Summary: icon-theme.cache gets detected incorrectly
Product: shared-mime-info Reporter: Stefan Friesel <stefan.friesel>
Component: freedesktop.org.xmlAssignee: Shared Mime Info group <shared_mime_info>
Status: RESOLVED NOTOURBUG QA Contact:
Severity: minor    
Priority: low    
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Stefan Friesel 2009-04-11 03:32:43 UTC
icon caches (created by gtk-update-icon-cache) are currently detected as application/x-font-ttf by the pattern
freedesktop.org.xml:5706 <match value="\000\001\000\000\000" type="string" offset="0"/>

imho this pattern is much to simple and should be removed/expanded (icon cashes happen to match this pattern because their header contains the version number 1.0.12 with 16bit-ints for each part).

icon cache files could be detected by
<glob pattern="*.cache"/>
or even
<treematch type="file" path="icon-theme.cache" match-case="true"/>
as this name seems to be canonical.
Comment 1 Bastien Nocera 2011-05-25 07:40:38 UTC
No real way to work around this problem, except GTK+ adding a proper magic header to its caches. Filed as https://bugzilla.gnome.org/show_bug.cgi?id=651067

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.