Bug 188989 - Browsing compressed archives doesn't work for jar and other zip format archives
Summary: Browsing compressed archives doesn't work for jar and other zip format archives
Status: RESOLVED INTENTIONAL
Alias: None
Product: kio
Classification: Frameworks and Libraries
Component: zip (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: David Faure
URL:
Keywords:
: 308112 311573 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-04-06 23:22 UTC by Bruno Schmidt
Modified: 2018-07-21 14:24 UTC (History)
13 users (show)

See Also:
Latest Commit:
Version Fixed In: 4.9.4


Attachments
Patched Zip Protocol File (281 bytes, patch)
2012-08-17 21:08 UTC, Emmanuel Pescosta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Bruno Schmidt 2009-04-06 23:22:54 UTC
Version:           1.2.1 (using KDE 4.2.1)
Compiler:          gcc 4.3.3 
OS:                Linux
Installed from:    Gentoo Packages

The option "Browse through archives" allows us to view the content of an archive without Ark, zip files work very well, but if the zip file has another extension like jar, war or ear then it just works through Ark.

Dolphin should open those zip files too.
Comment 1 Diego 2010-12-20 14:15:51 UTC
Still applies to KDE 4.5.4
Comment 2 Matthias Fuchs 2011-05-28 01:00:42 UTC
I can reproduce this issue for jar files, yet not for war or ear files. Can you still reproduce it also for those?
Comment 3 Bruno Schmidt 2011-05-31 02:52:46 UTC
As it seams, if the file content is auto-detected as a "Zip archive" it will load inside of Dolphin, but if it is detected by the extension like "Java Archive" it will not.

I tried to create an "Web archive" and I can't make it load inside of Dolphin.
Comment 4 Emmanuel Pescosta 2012-08-17 21:08:28 UTC
Created attachment 73259 [details]
Patched Zip Protocol File

I simply modified the zip.protocol file and updated the ksycoca database. 

Changed archiveMimetype=application/zip to archiveMimetype=application/zip,application/x-java-archive in /usr/share/kde4/services/zip.protocol

and then rebuild the ksycoca database

.war files worked for me
Comment 5 Jeroen van Meeuwen (Kolab Systems) 2012-08-24 16:20:03 UTC
Resetting assignee to default as per bug #305719
Comment 6 Jekyll Wu 2012-08-24 19:45:54 UTC
(In reply to comment #4)
> Created attachment 73259 [details]
> Patched Zip Protocol File

Submit it  onto reviewboard ?
Comment 7 Bryan Cuneo 2012-10-26 21:25:36 UTC
[Part of the Dolphin Bug Weeks 2012]
I can confirm this for .jar files with Dolphin 2.1/KDE SC 4.9.2 (Kubuntu Quantal packages). It seems to work fine with .war and .ear files, though.
Comment 8 Emmanuel Pescosta 2012-10-29 12:59:26 UTC
Review-Request: https://git.reviewboard.kde.org/r/101455/
Comment 9 Jekyll Wu 2012-10-30 10:30:45 UTC
*** Bug 308112 has been marked as a duplicate of this bug. ***
Comment 10 David Faure 2012-11-21 15:49:20 UTC
Please test this fix instead: http://www.davidfaure.fr/2012/188989.diff
(and reply on reviewboard, or ping me by private mail)
Comment 11 David Faure 2012-11-29 10:56:06 UTC
Git commit 4f296cfbced2c4ad54beec8f500ed2d3fc04ee05 by David Faure.
Committed on 29/11/2012 at 11:07.
Pushed by dfaure into branch 'KDE/4.9'.

Also check parent mimetypes in protocolForArchiveMimetype().

This fixes opening of JAR archives with the zip ioslave.

REVIEW: 101455
FIXED-IN: 4.9.4

M  +18   -1    kio/kio/kprotocolmanager.cpp

http://commits.kde.org/kdelibs/4f296cfbced2c4ad54beec8f500ed2d3fc04ee05
Comment 12 Silver Salonen 2012-12-05 15:13:46 UTC
After upgrading to 4.9.4 .xlsx and .pptx files are opened within Dolphin, not with separate application (as they did before and as it is assigned in filetypes association). Is that meant to be that way?
Comment 13 Frank Reininghaus 2012-12-05 17:21:22 UTC
(In reply to comment #12)
> After upgrading to 4.9.4 .xlsx and .pptx files are opened within Dolphin,
> not with separate application (as they did before and as it is assigned in
> filetypes association). Is that meant to be that way?

No, it's certainly not meant to be that way. Looks like what has been reported today as bug 311214.
Comment 14 Frank Reininghaus 2012-12-06 06:23:10 UTC
The fix had to be reverted due to its disastrous consequences (bug 311214). Maybe changing kioslave/archive/zip.protocol is the better idea in the end.

But IMHO, it might actually be sufficient that you can open .jar files by entering

zip:/path/to/foo.jar

in the location bar. I don't know if we should really risk another regression for such a minor thing. From my point of view, this report could be marked as WONTFIX or 'wishlist', but since it's more a KIO issue, I'll leave that up to others to decide.
Comment 15 Frank Reininghaus 2012-12-12 15:18:49 UTC
*** Bug 311573 has been marked as a duplicate of this bug. ***
Comment 16 Janet 2013-05-12 14:54:28 UTC
I don't know how this could be achieved - but Konqueror once had a solution, in KDE 3: When you left clicked on a file it was opened in konqueror and when you middle clicked it was opened with the appropriate default application... Maybe something like that could be integrated into dolphin for files that actually are archives...
Comment 17 Julian Steinmann 2018-07-21 14:24:06 UTC
Most users will never need such a feature, so IMHO it is sufficient if you can open .jar files through zip:/path/to/jar. I'll therefore close this bug report, but if you consider this feature to be important enough then please file a new bug (probably against Dolphin instead of KIO).