Skip to content

tarball: properly normalize perms for all extracted files

The previous implementation would not normalize permissions for files detected as executable. This would make the loader crash when a file has bogus permissions such as 0o100100 (executable but not readable).

This adds a test that all possible file permissions properly normalize to either 0o100644 or 0o100755.

Addresses sentry issue: https://sentry.softwareheritage.org/share/issue/062198271b4d40feab41330f12ec4dc2/ (yes, I've seen swh-loader-core#3244, but this looked like a low enough hanging fruit...)

Test Plan

new test added.


Migrated from D5614 (view on Phabricator)

Merge request reports