[Okular-devel] [Bug 189194] support any arbitrary archive format

Pino Toscano pino at kde.org
Thu Apr 9 13:28:41 CEST 2009


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


Pino Toscano <pino at kde.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |WONTFIX




--- Comment #6 from Pino Toscano <pino kde org>  2009-04-09 13:28:38 ---
(In reply to comment #4)
> > Technically, "x.rar" is not a comicbook, but just a rar file. 
> 
> The same for .cbr -- it is just rar file.

... but explicitly telling "i'm a comicbook document". And if it isn't, then it
is fault of whoever marked it that way.

Let's go on with a bit of theory now, as you seem to speculate too much.

The PDF file format (MIME type) has two way to be recognized: an extension
(.pdf) and a "magic", ie a sequence of leading bytes (header) in the document
itself. If you try to open a PDF document named foo.xxx, one of the two ways is
missing (the extension), but most probably the other not (the magic).

In case of comicbook documents, we have the various "unique" cbr, cbz, cba,
etc, extensions, but the magic is not unique, as it is the same of a zip, rar,
etc. Thus, the *only* way to distinguish what you call "comicbook compressed as
zip" from a normal zip archive is the extension.
Also see http://en.wikipedia.org/wiki/Comic_Book_Archive_file

> I don't see any reason why comic book should be treated differently (worse)
> than pdf.

As you can see, we're not treating comicbook worse, but just handling the only
way we have to recognize them out of the wild, given also the fact there's
nothing in the archive itself that can be used to indicate that.

> So it is clear okular checks the content for pdf and ignores extension completely.

Okular does not ignore the extension.

> The wish is to extent this useful behaviour to all accepted formats.

Ignoring the extension would mean making Okular's comicbook backend blindly
accept _any_ archive, and I don't want people misusing Okular as a second Ark.
I wouldn't call it as "useful behaviour".

Thus, the wish is rejected.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Okular-devel mailing list