Created
May 15, 2019 13:23
-
-
Save Gro-Tsen/2961f34df4a29d143c7b3499fac7e130 to your computer and use it in GitHub Desktop.
Fix for DjVu files being detected as MIME type image/vnd.djvu instead of image/vnd.djvu+multipage
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info"> | |
<!-- Created on 2019-05-15 to fix a reappearance of this bug: --> | |
<!-- https://bugs.launchpad.net/ubuntu/+source/djvulibre/+bug/1778088 --> | |
<!-- (DjVu seen as image/vnd.djvu instead of image/vnd.djvu+multipage) --> | |
<!-- https://twitter.com/gro_tsen/status/1128645721614356480 --> | |
<!-- Run "update-mime-database ~/.local/share/mime" after creating this. --> | |
<!-- Use "xdg-mime query filetype some-file.djvu" to test. --> | |
<!-- - David A. Madore --> | |
<mime-type type="image/vnd.djvu+multipage"> | |
<comment>DjVu image</comment> | |
<alias type="image/x-djvu"/> | |
<magic priority="99"> | |
<match value="AT&TFORM" type="string" offset="0"> | |
<match value="DJVU" type="string" offset="12"/> | |
</match> | |
<match value="FORM" type="string" offset="0"> | |
<match value="DJVU" type="string" offset="8"/> | |
</match> | |
</magic> | |
<glob pattern="*.djvu"/> | |
<glob pattern="*.djv"/> | |
</mime-type> | |
</mime-info> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The override.xml file in question should be placed in ~/.local/share/mime/packages/ and then run "update-mime-database ~/.local/share/mime" (to create or regenerate ~/.local/share/mime/mime.cache).