libarchive backend: display permissions in octal format
ClosedPublic

Authored by alnikiforov on Mar 12 2020, 11:54 AM.

Details

Summary

Currently when libarchive backend is used to read archive, permissions are displayed in decimal format. But a lot of userspace tools show and use permissions either in text format or in octal number format for convenience, not in a decimal number format.

Test Plan

Open an archive which ark uses libarchive for opening. For example, https://github.com/KDE/ark/archive/v19.12.3.tar.gz

For directories permissions should be displayed as '40775' instead of '16893'.
For non-executable files permissions should be displayed as '100664' instead of '33204'.

Diff Detail

Repository
R36 Ark
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
alnikiforov created this revision.Mar 12 2020, 11:54 AM
Restricted Application added a project: Ark. · View Herald TranscriptMar 12 2020, 11:54 AM
Restricted Application added a subscriber: kde-utils-devel. · View Herald Transcript
alnikiforov requested review of this revision.Mar 12 2020, 11:54 AM

Comparison of result before change and after change:

elvisangelaccio accepted this revision.Mar 15 2020, 5:33 PM

Thanks, makes a lot of sense. I'll push it for you.

This revision is now accepted and ready to land.Mar 15 2020, 5:33 PM
This revision was automatically updated to reflect the committed changes.