Bug 366899 - Ark fails to open certain .tar file
Summary: Ark fails to open certain .tar file
Status: RESOLVED UPSTREAM
Alias: None
Product: ark
Classification: Applications
Component: general (show other bugs)
Version: 16.04.3
Platform: Arch Linux Linux
: NOR major
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-16 19:13 UTC by Luca Weiss
Modified: 2018-04-29 09:57 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Luca Weiss 2016-08-16 19:13:53 UTC
Commandline output:

$ ark MP190_debian_printer.tar
ark.kerfuffle: Mimetype for filename extension ( "application/x-tar" ) did not match mimetype for content ( "text/plain" ). Using content-based mimetype.
ark.kerfuffle: Could not find a plugin to handle "/mnt/hdd/Downloads/MP190_debian_drivers/MP190_debian_printer.tar"

I can list the contents of the file with
$ tar tvf MP190_debian_printer.tar
and extract the archive with
$ tar xvf MP190_debian_printer.tar -C output
without any problems.

I can't attach the archive as it is 8MB big and the limit is 4MB so I have uploaded it to mediafire (hope that doesn't bother you): http://www.mediafire.com/download/8zvjdq2hsfn12v1/MP190_debian_printer.tar
Comment 1 Elvis Angelaccio 2016-08-16 20:03:13 UTC
Thanks for the report. 
shared-mime-info detects by content the file as text/plain, so I've forwarded your test file to their bugtracker: https://bugs.freedesktop.org/show_bug.cgi?id=97372
Comment 2 demm 2016-09-13 22:21:16 UTC
As discussed on IRC, this seems to be an issue with new shared-mime-info 1.7

This commit introduces an official IANA registered type:
https://cgit.freedesktop.org/xdg/shared-mime-info/commit/?id=2002c05bb1e85e6e3f0be1427d727e896ebbaf10

Using shared-mime-info 1.7 on a rar file returns correct value:
$ xdg-mime query filetype example.rar
application/vnd.rar

A rebuild of Ark with these 2 sed lines makes it so Ark open .rar. files correctly again:
sed -i 's|application/x-rar|application/vnd.rar|' plugins/clirarplugin/CMakeLists.txt
sed -i 's|application/x-rar|application/vnd.rar|' plugins/clirarplugin/kerfuffle_clirar.json.cmake

(not intended as a patch, since this will break rar files for systems with older then 1.7, just mentioning these sed lines to inform they fix this issue for shared-mime-info 1.7 only)
Comment 3 Elvis Angelaccio 2016-09-14 08:03:24 UTC
(In reply to demm from comment #2)
> As discussed on IRC, this seems to be an issue with new shared-mime-info 1.7
> 
> This commit introduces an official IANA registered type:
> https://cgit.freedesktop.org/xdg/shared-mime-info/commit/
> ?id=2002c05bb1e85e6e3f0be1427d727e896ebbaf10
> 
> Using shared-mime-info 1.7 on a rar file returns correct value:
> $ xdg-mime query filetype example.rar
> application/vnd.rar
> 
> A rebuild of Ark with these 2 sed lines makes it so Ark open .rar. files
> correctly again:
> sed -i 's|application/x-rar|application/vnd.rar|'
> plugins/clirarplugin/CMakeLists.txt
> sed -i 's|application/x-rar|application/vnd.rar|'
> plugins/clirarplugin/kerfuffle_clirar.json.cmake
> 
> (not intended as a patch, since this will break rar files for systems with
> older then 1.7, just mentioning these sed lines to inform they fix this
> issue for shared-mime-info 1.7 only)

Let's track this in #368786
Comment 4 Edmund Kasprzak 2018-02-12 21:22:13 UTC
#368786 is RESOLVED FIXED.

Currently, I still can't open the MP190_debian_printer.tar

Neon git stable, Plasma 5.12.0, KF 5.43.0, Qt 5.9.3, Ark 17.12.2
Tried with shared-mime-info 1.5, 1.7 and 1.9
Comment 5 Patrick Silva 2018-02-20 17:20:00 UTC
on Arch Linux, Ark 17.12.2 says "no suitable plugin found. Ark does not seem to support this file type" when I try to open MP190_debian_printer.tar file.