Bug 333078 - When called externally tar archives open in ark instead of as a folder
Summary: When called externally tar archives open in ark instead of as a folder
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 4.11.5
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: reproducible
Depends on:
Blocks:
 
Reported: 2014-04-04 15:16 UTC by mimo
Modified: 2014-08-31 22:17 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In: 4.14.1


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description mimo 2014-04-04 15:16:32 UTC
This used to work in Kubuntu 12.04 and 12.10


Reproducible: Always

Steps to Reproduce:
1. create a simple archive: tar cvf testing.tar <somefile>
2. in a terminal: dolphin testing.tar
3.
Actual Results:  
dolphin launches ark to view the archive

Expected Results:  
dolphin shows contents of tar archive like a folder (it does this when I just click on the tar file inside dolphin)
Comment 1 Frank Reininghaus 2014-04-04 16:01:26 UTC
Thanks for the bug report. I can confirm that this used to work, but does not work any more. git bisect tells me that this was broken by

https://git.reviewboard.kde.org/r/110487/

At first sight, I don't see how this patch affects archives that are being passed on the command line though.
Comment 2 Frank Reininghaus 2014-08-31 22:17:14 UTC
Git commit 421e7ea410af32be2dff06207b459cefbdf43306 by Frank Reininghaus.
Committed on 31/08/2014 at 22:06.
Pushed by freininghaus into branch 'KDE/4.14'.

Make it possible to open archives via the command line

This used to work before afcf8961f6666a912e0e6e5072a000837f7cf6aa (only
if "Open archives as folder" was enabled in the settings though). The
reason why this commit broke it is that the mime type of a file is not
determined automatically any more before asking
KProtocolManager::protocolForArchiveMimetype for the correct protocol,
so the determination of the protocol may fail.

Keeping the isMimeTypeKnown() check in DolphinView::openItemAsFolderUrl
still makes sense, because it prevents GUI blocking if the user tries
to open many files at the same time.

Therefore, we now call determineMimeType() in
DolphinViewContainer::slotUrlIsFileError(const KUrl&) and then try to
determine the correct protocol and use it to open the archive in the
view, rather than hoping that slotItemActivated(item) will do the right
thing.
REVIEW: 119877
FIXED-IN: 4.14.1

M  +10   -1    dolphin/src/dolphinviewcontainer.cpp

http://commits.kde.org/kde-baseapps/421e7ea410af32be2dff06207b459cefbdf43306