[Okular-devel] [okular] [Bug 343645] Treat archive files (.zip, .rar, ...) full of images in the same way as CBR and CBZ files

Nicolas Frattaroli kdebugs at fratti.ch
Wed Sep 16 14:21:27 UTC 2015


https://bugs.kde.org/show_bug.cgi?id=343645

--- Comment #6 from Nicolas Frattaroli <kdebugs at fratti.ch> ---
As somebody in the review request ( https://git.reviewboard.kde.org/r/125020/ )
stated, this may not be a good idea.

Currently, Okular gets the mimetypes it can open from the .desktop files if I
understand the code correctly; however, adding zip- and rar-files to those
desktop files would mean that Okular would appear as a choice for opening these
files.

The core issue, which is that Okular assumes it cannot open a file if it is not
in the .desktop, could also be fixed differently:
If no mimetype match is made, try to see if the filetype is recognised by any
magic numbers, completely ignoring the file extension; this, for example, could
be done with libmagic, which is also what the "file" utility uses. Since Okular
currently recognises the magic number of things passed to it via stdin, it
already has this functionality built into it somewhere, but not used in the way
I propose.

This would have the benefit that .cbr and .cbz files could also be opened by
Okular if they're read from stdin, since Okular only sees the data that way and
currently concludes that it is a zip- or rar-file and therefore cannot be
opened.

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the Okular-devel mailing list