Skip to content

Adapt to xdgmime change

David Faure requested to merge work/dfaure/adapt_to_xdgmime_change into master

As the spec says, if the result from magic sniffing doesn't match one of the globs, ignore it and return one of the globs.

Some of the tests for recent mimetype additions relied on this behaviour, so improve application/x-saturn-rom, application/x-dreamcast-rom, etc. by ensuring that their magic has prio 60, just like application/x-sega-cd-rom already does.

To make them all equal (and only distinguishable by magic) I made sure they all have the same *.iso glob (but not *.bin, see !31 (merged)) This is not tested by the test suite though, only for application/x-sega-cd-rom.

With this change, test-garbage.key (which was already a doubtful testcase, see !5 (closed)) no longer falls back to application/octet-stream but to one of the globs. test-really-html-not-xhtml.html is also fixed by this, it's detected as text/html.

Depends on xdgmime!3 (merged)

Closes: #138 (closed).

Edited by David Faure

Merge request reports