Display "executable" in info panel instead of "unknown"
ClosedPublic

Authored by umanovskis on Oct 3 2019, 11:04 AM.

Details

Summary

Executable files often have no extension, so MIME detection doesn't work. We can make an educated guess that octet-stream files with execute bit set are executables.

Diff Detail

Repository
R36 Ark
Branch
exec-info
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 17462
Build 17480: arc lint + arc unit
umanovskis created this revision.Oct 3 2019, 11:04 AM
Restricted Application added a project: Ark. · View Herald TranscriptOct 3 2019, 11:04 AM
Restricted Application added subscribers: Ark, kde-utils-devel. · View Herald Transcript
umanovskis requested review of this revision.Oct 3 2019, 11:04 AM

Before and after comparison.

elvisangelaccio requested changes to this revision.Oct 8 2019, 8:30 PM

+1 for the idea.

part/infopanel.cpp
183–187

Please use mimeType.isDefault() instead.

184

Instead of using a custom string (which needs to be translated from scratch), we could get the mimetype using db.mimeTypeForName(QStringLiteral("application/x-executable")) and then get the comment() of this mimetype.

This revision now requires changes to proceed.Oct 8 2019, 8:30 PM
umanovskis updated this revision to Diff 67526.Oct 9 2019, 7:46 AM
  • Changed per review comments
elvisangelaccio accepted this revision.Oct 13 2019, 9:05 PM
This revision is now accepted and ready to land.Oct 13 2019, 9:05 PM
This revision was automatically updated to reflect the committed changes.