Suggested change to the shared-mime-info spec

Christophe Fergeau teuf at
Wed Apr 20 22:26:54 EEST 2005


While looking at bug I
realized that the shared mime info spec doesn't say anything when
multiple sniffing patterns match for the same data. In the general case,
it's not obvious to decide which one should be chosen over the others.
However, after discussing the issue with jrb, when one of the two mime
type is a subclass of the other, I think it makes sense to use the more
specialized one as the mime type. 
I already committed code which does that to xdgmime, and I'd like to add
the following paragraph to the shared-mime-info spec:

+If two magic patterns corresponding to 2 differents mime types match,
and one
+of the mime type is a subclass of the other one, then the subclass mime
+should be used. If two magic patterns match, and the two matching mime
+have no relationship, then the result is implementation dependent.
+               </para><para>

If nobody disagrees with that, I'll commit that change to
shared-mime-info CVS some time next week. Feel free to reformulate that
to make it clearer too ;)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: s-m-i.diff
Type: text/x-patch
Size: 1201 bytes
Desc: not available
Url : 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : 

More information about the xdg mailing list