Fix mime types of .ico files

In diffs .ico files did not get shown, as the reported mime type was
"application/octet-stream" instead of "image/x-icon".

While mime-utils correctly reports both of the above mime types as
possible mime types for .ico files, application/octet-stream are
incorrectly reported with specificity 1 (instead of 0 or below), which
caused problems when sorting the mime types to get the most specific
one.

We now override MimeType's computation of specificity for generic
types and force low enough values for the sorting to work as
expected. Thereby, .ico files get correctly reported as image/x-icon.

Change-Id: I587a3fdbe29eda94a9a7dd0e1a353c0ea4a3958a
1 file changed