nowdays .tar.gz and .tar.bz2 files are recognized as
application/x-bzip and application/x-gzip respectively.
also added application/x-gzip-compressed-tar because
application/x-bzip-compressed-tar is in the list and I
think that's a legacy one but should not hurt.
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
even when used from the ark app it still locks up, and even if it
was ment to be called only from the ark app it's a shared library
which everyone can use so to this is neccessary anyway.
In the cases where we returned before calling KApplication::exec(), we
would end up leaking pointers such as |batchJob|, |window| and
|addToArchiveJob|.
Fix it by explicitly deleting |window| (since we do not have another
QWidget to make it a child of) and making |batchJob| and
|addToArchiveJob| be children of our main KApplication so that we do not
need to explicitly delete them under any circumstances.
since CMake 2.8.3 (according to Raphael) FindLibArchive module is
bundled with it, to avoid dublication drop the bundled one.
in addition, libarchive does not conditionally define support of
archives and will just bail out if the format is not recognized
thus dropping the ifdef's in the handler
TODO: the format does not get recognized via archive_format() when
called on existing archive created with Ark, what the heck? is it
a libarchive bug (test with git checkout)? if it is then checking
the format in the case when the filter is ARCHIVE_FILTER_NONE with
another switch would do the job without manually checking the
extensions for zip and 7z.