Conflicting mime types

David Faure faure at kde.org
Tue Mar 19 06:22:11 PDT 2013


On Tuesday 05 March 2013 13:28:15 Thomas Kluyver wrote:
> In the file structure, the priority attribute is a property of the magic
> matching rule, not of the mimetype. The description in the spec, on the
> other hand, seems to be relevant to the Mimetype overall: "Low numbers
> should be used for more generic types (such as 'gzip compressed data') and
> higher values for specific subtypes (such as a word processor format that
> happens to use gzip to compress the file)."
> 
> So does it make sense to use this even when we're not using the magic
> matching rules?

No, the "glob weight" is what should be used to choose between two globs.

But I guess the question is "what if the weights are the same?". Well, same 
globs, same weight, and same magic (or no magic), is a complete conflict, I 
don't think there's anything sensible to do other than fixing the mimetype xml 
(which has been done for this case already).

Maybe Jerome meant addin a new package-level priority value, so that 
freedesktop.org.xml always has priority over weird 3rd-party mimetype 
definitions. But I'm not sure we really want that.

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Working on KDE, in particular KDE Frameworks 5



More information about the xdg mailing list