Suggested change to the shared-mime-info spec

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


Hi,

While looking at bug https://bugs.freedesktop.org/show_bug.cgi?id=2686 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
type
+should be used. If two magic patterns match, and the two matching mime
types
+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 ;)

Thanks,

Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: s-m-i.diff
Type: text/x-patch
Size: 1201 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xdg/attachments/20050420/7b17008c/attachment.bin 
-------------- 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 : http://lists.freedesktop.org/archives/xdg/attachments/20050420/7b17008c/attachment.pgp 


More information about the xdg mailing list