mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Linux installer: Do not register application/octet-stream as one of the mimetypes calibre can handle
This commit is contained in:
parent
3cf2112775
commit
d81046013e
@ -804,11 +804,12 @@ class PostInstall:
|
|||||||
cc('xdg-icon-resource install --size 256 calibre-ebook-edit.png calibre-ebook-edit', shell=True)
|
cc('xdg-icon-resource install --size 256 calibre-ebook-edit.png calibre-ebook-edit', shell=True)
|
||||||
self.icon_resources.append(('apps', 'calibre-ebook-edit', '256'))
|
self.icon_resources.append(('apps', 'calibre-ebook-edit', '256'))
|
||||||
|
|
||||||
mimetypes = set([])
|
mimetypes = set()
|
||||||
for x in all_input_formats():
|
for x in all_input_formats():
|
||||||
mt = guess_type('dummy.'+x)[0]
|
mt = guess_type('dummy.'+x)[0]
|
||||||
if mt and 'chemical' not in mt and 'ctc-posml' not in mt:
|
if mt and 'chemical' not in mt and 'ctc-posml' not in mt:
|
||||||
mimetypes.add(mt)
|
mimetypes.add(mt)
|
||||||
|
mimetypes.discard('application/octet-stream')
|
||||||
|
|
||||||
def write_mimetypes(f):
|
def write_mimetypes(f):
|
||||||
f.write('MimeType=%s;\n'%';'.join(mimetypes))
|
f.write('MimeType=%s;\n'%';'.join(mimetypes))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user