Bug 399806 - "Extract" submenu won't show op on compressed files without extension
Summary: "Extract" submenu won't show op on compressed files without extension
Status: RESOLVED FIXED
Alias: None
Product: ark
Classification: Applications
Component: general (other bugs)
Version First Reported In: 18.08.2
Platform: Gentoo Packages Linux
: NOR minor
Target Milestone: ---
Assignee: Elvis Angelaccio
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-10-14 17:54 UTC by acidrums4
Modified: 2018-10-22 17:43 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In: 18.08.3
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description acidrums4 2018-10-14 17:54:40 UTC
SUMMARY
Dolphin can group and correctly identify filetypes for compressed files (.zip, .tar, .7z, .rar...). But for a file that does not have the extension in its filename, and you right-click it, the "Extract" submenu won't appear - but still it will offer to open them with Ark.

You have to manually add an extension to that file to be able to get that submenu via right click. I've noticed this happens on .zip, .tar.gz and .rar files - maybe on other filetypes happens, too. So my suggestion is that the conditional to make this submenu appears should be based on whatever Dolphin uses to identify filetypes (magic numbers and that stuff) instead of file extensions.

STEPS TO REPRODUCE
1. Get a compressed file without extension in its name (rename an existing file deleting its extension, download a master branch of some project from GitHub...)
2. Right-click on it.

OBSERVED RESULT
"Extract" submenu does not show up on the listed options.

EXPECTED RESULT
"Extract" submenu should appear for those files, regardless of their extension on their filename but according to whatever file type Dolphin retrieves for said files.
Comment 1 Elvis Angelaccio 2018-10-14 19:58:04 UTC
Git commit 73cb4111124832891341436bd53ea1c35764f0cd by Elvis Angelaccio.
Committed on 14/10/2018 at 19:50.
Pushed by elvisangelaccio into branch 'Applications/18.08'.

Show 'Extract' menu on archives without extension

determineMimeType() needs the absolute path of the archive, otherwise
the QFileInfo::isReadable() check will always return false (it will then
fallback to `mimeFromExtension`, but that's also invalid if the archive
doesn't have an extension).
FIXED-IN: 18.08.3

M  +1    -1    app/extractfileitemaction.cpp
M  +4    -0    kerfuffle/mimetypes.h

https://commits.kde.org/ark/73cb4111124832891341436bd53ea1c35764f0cd
Comment 2 Patrick Silva 2018-10-17 13:37:31 UTC
"Open archives as folder" dolphin feature does not work when a zip file has no extension.
Is such problem related to this report? Or should I open a new report?
Comment 3 Elvis Angelaccio 2018-10-22 17:43:32 UTC
(In reply to Patrick Silva from comment #2)
> "Open archives as folder" dolphin feature does not work when a zip file has
> no extension.
> Is such problem related to this report? Or should I open a new report?

No. Please open another report against dolphin. Thanks!