Skip to content

content-type: Check for conflicting plain files and markdown files

Currently when a file is named i.e. COPYING or README, it is tagged a content type text/x-copying, so it receives the correct symbolic icon.

But when the file is i.e. COPYING.md or README.md, then it's detected as a markdown file and so it uses the markdown icon instead of the correct bundled icon (copyright logo).

So this commit checks for common file names that might be put as markdown (or another format, for what it's worth), and use the correct bundled icon for those files. This work can't be done in the shared-mime-info database because it's mostly based on the use-case of the file, not its format, so there would be conflicts between multiple content type.


I'm not sure what incidence on performances this might have… I don't think it'll make too much harm since there's only seven prefixes to check.

Merge request reports