Questions regarding the shared mime spec

David Faure faure at kde.org
Sun Oct 2 00:59:30 PDT 2011


On Saturday 01 October 2011 17:08:43 Johannes Pfau wrote:
> Maybe the testsuite has a different understanding of match-by-name than
> me: My library allows to explicitly do the matching by filename
> only (useful when a file doesn't exist (yet)).

No, that's correct, we all have the same understanding of this.

> I think in this case
> match-by-name should signal an error / return an empty string as the
> result is ambiguous?

I don't agree. It's more useful to the user if we pick one of the two 
mimetypes, that gives 50% chances that it's correct, and if it's not, the user 
will know which mimetype definition to change in order to fix it.
If we just return empty, the user will get a generic error or no associated 
applications at all, and the overall experience will just be worse.

Alexander replied with "longest match" but that's only useful in order to 
resolve *.ps.gz vs *.gz. For the case of two mimetypes associated with *.dot, 
we need to just pick one. Maybe we could all agree on "the first mimetype in 
alphabetical order", in order to make the results identical between 
implementations, which allows to share the same testsuite?
(with less work than my idea of rewriting the tests/list file to a different 
syntax)

-- 
David Faure, faure at kde.org, http://www.davidfaure.fr
Sponsored by Nokia to work on KDE, incl. Konqueror (http://www.konqueror.org).


More information about the xdg mailing list