GContentType doesn't keep track of file extensions
@ruslanizhb
Submitted by LRN Link to original bug (#784747)
Description
GContentType is a string, and glib is canonically written with the assumption that this string is a MIME/type. Some time ago there was a discussion about changing this in a somewhat compatible way to ensure that other metadata (other than MIME/type) can be preserved in the content type string, which would help portability.
These patches are the result of that. More specifically, the discussion mostly happened in bug 735696 (particularly - bug 735696, comment 45). However, it's been hard to get someone to review this code due to the fact that it mixed W32, gcontenttype and xdgmime changes. Therefore i picked my Debian laptop and re-worked the code to make changes to the "unix" contenttype code and xdgmime the first step, completely excising any mentions of W32 and doubling down on testsuite additions.
The code still has some xdgmime behavior changes thrown in (globs2 check, empty cache check). Hopefully, that won't be a problem.