Bug 363717 - OpenDocument and epub file can't be opened
Summary: OpenDocument and epub file can't be opened
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 16.04.0
Platform: Debian testing Linux
: NOR normal
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-05-30 20:45 UTC by Luigi Toscano
Modified: 2016-06-05 19:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In: 16.04.2
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luigi Toscano 2016-05-30 20:45:24 UTC
Apparently after the switch to the new plugin model, few formats which are zip files in disguise, like OpenDocument (tested with odt and ods) and epub can't be opened anymore. 
The following error is printed on the command line:
ark.kerfuffle: Could not find a plugin to handle '/path/to/the/file'

and the following message is shown inside the informative widget on the top of the main window:

Ark was not able to open myfilename.ext. No suitable plugin found.
Ark does not seem to support this file type.

Please note that jar files do work. I suspect other formats are affected.

Reproducible: Always
Comment 1 Elvis Angelaccio 2016-05-31 09:46:22 UTC
Up for review: https://phabricator.kde.org/D1725
Comment 2 Elvis Angelaccio 2016-06-05 18:22:14 UTC
Git commit 8b9cd300c354cc1a8b14d5cd1ae75c25ad424927 by Elvis Angelaccio.
Committed on 05/06/2016 at 18:15.
Pushed by elvisangelaccio into branch 'Applications/16.04'.

Fix opening of files whose mimetype inherits from a supported mimetype

Before 16.04 Ark used to be able to open files whose mimetype is not directly
registered with Ark, but inherits from a mimetype that is supported by Ark.
Examples are .odt and .epub files that both inherits from application/zip.

Since we don't use anymore KMimeTypeTrader (since 16.04), we need to manually
do this check while loading our plugins.
FIXED-IN: 16.04.2

Differential Revision: D1725

M  +6    -0    autotests/kerfuffle/archivetest.cpp
A  +-    --    autotests/kerfuffle/data/test.odt
M  +19   -2    kerfuffle/archive_kerfuffle.cpp

http://commits.kde.org/ark/8b9cd300c354cc1a8b14d5cd1ae75c25ad424927
Comment 3 Elvis Angelaccio 2016-06-05 19:02:25 UTC
Git commit 6f768813da573aef6d99a98cdf713dc8188f3e23 by Elvis Angelaccio.
Committed on 05/06/2016 at 18:57.
Pushed by elvisangelaccio into branch 'master'.

Merge branch 'Applications/16.04'

This adapts the patch in D1725 to our new PluginManager class.

M  +6    -0    autotests/kerfuffle/archivetest.cpp
A  +10   -2    kerfuffle/pluginmanager.cpp     [License: BSD]
A  +2    -2    kerfuffle/pluginmanager.h     [License: BSD]

http://commits.kde.org/ark/6f768813da573aef6d99a98cdf713dc8188f3e23