Question about shared-mime-info spec

Felix Natter fnatter at gmx.net
Sat May 23 19:00:28 UTC 2020


hello,

I am maintaining a "freeplane" package for Debian, which has this MIME
configuration (according to shared-mime-info-spec):

	<glob pattern="*.mm" />
	<magic priority="66">
		<match type="string" value="<map version="freeplane" offset="0" />
	</magic>

This has "or" semantics (freeplane is invoked if a file is named *.mm OR
contains the magic string), but the application does not handle files
not ending in ".mm" (which results in an infinite loop because freeplane
passes control back to the os, which then calls freeplane due to the
magic string again...).

So the short question is: Is there a chance for AND semantics here? I
don't like to remove the magic string, because there are other programs
which use .mm suffix (and even FreeMind, which uses a different magic
string).
OR semantics can always be achieved with two <mime-type> blocks,
but I realize this cannot be changed now, so how about adding a
'requiresGlob' attribute on the <magic> tag or any similar solution?

Many Thanks and Best Regards,
--
Felix Natter



More information about the xdg mailing list