Bug 411330 - Users are not able to browse rar files using the return key (it works for other files: 7z, zip, etc.)
Summary: Users are not able to browse rar files using the return key (it works for oth...
Status: RESOLVED FIXED
Alias: None
Product: krusader
Classification: Applications
Component: general (show other bugs)
Version: Git
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Krusader Bugs Distribution List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-26 21:19 UTC by Toni Asensi Esteve
Modified: 2019-09-15 16:32 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toni Asensi Esteve 2019-08-26 21:19:55 UTC
Users are not able to browse rar files using the return key (it works for other files: 7z, zip, etc.)

At least in Kubuntu 18.04: rar files can not be browsed using the return key, if return is pressed then Krusader launches Ark (instead of browsing the rar file).
Comment 1 Toni Asensi Esteve 2019-08-26 21:25:39 UTC
There's a proposed solution in https://phabricator.kde.org/D23476
Comment 2 Toni Asensi Esteve 2019-09-15 16:32:17 UTC
Git commit e229f9ba7301e529aebf7262bb717be5d914d2fa by Toni Asensi Esteve.
Committed on 15/09/2019 at 16:21.
Pushed by asensi into branch 'master'.

Identify the "application/vnd.rar" MIME type in order to allow some operations

In order to solve [Users are not able to browse rar files using Return (although it works for 7z, zip files, etc.)](https://bugs.kde.org/show_bug.cgi?id=411330), the Internet Media Type "application/vnd.rar" is recognized in `KrArcBaseManager::getShortTypeFromMime(const QString &mime)`.

ADDITIONAL INFORMATION

In <https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Complete_list_of_MIME_types> the type of rar files is "application/x-rar-compressed", but in the aforementioned page it's also declared that
    IANA is the official registry of MIME media types and maintains a [list of all the official MIME types](http://www.iana.org/assignments/media-types/media-types.xhtml)
and precisely in that place what it's stated is "application/vnd.rar", with a link to
    https://www.iana.org/assignments/media-types/application/vnd.rar
where it's written
    1. Deprecated alias names for this type: application/x-rar-compressed

Note: "application/vnd.rar" is already used in Krusader, in `KrServices::generateKrarcArchiveMimetypes()`.

The text "application/x-rar;application/x-rar-compressed;application/vnd.rar" can be searched in https://github.com/lxde/libfm/blob/master/data/archivers.list

In Kubuntu 18.04 I executed:
    $ xdg-mime query default application/x-rar
    org.kde.ark.desktop
    $ xdg-mime query default application/x-rar-compressed
    org.kde.ark.desktop
    $ xdg-mime query default application/vnd.rar
    org.kde.ark.desktop
    $ xdg-mime query default application/vnd.JUST_TO_CHECK_THAT_IT_CAN_FAIL; echo $?
    4

Several people had a similar problem when using other programs (https://bbs.archlinux.org/viewtopic.php?pid=1748314#p1748314 , https://github.com/webmin/webmin/issues/702#issue-276713752).

FIXED: [ 411330 ] Users are not able to browse rar files using Return (although it works for 7z, zip files, etc.)

Differential Revision: https://phabricator.kde.org/D23476

M  +1    -1    krArc/krarc.protocol
M  +6    -1    krArc/krarcbasemanager.cpp
M  +5    -0    krusader/krservices.cpp

https://commits.kde.org/krusader/e229f9ba7301e529aebf7262bb717be5d914d2fa