HomeSoftware Heritage

tarball: Try to get archive format before unpacking it

Description

tarball: Try to get archive format before unpacking it

By default shutil.unpack_archive will try to match the archive format
from its extension but it does not do it in a case insensitive way.
Thus trying to extract a file named "archive.ZIP" will fail.

So try to detect archive format in a case insensitive way by processing
the data returned by shutil.get_unpack_formats prior unpacking.

Details

Provenance
anlambertAuthored on Sep 15 2021, 11:59 AM
anlambertPushed on Sep 15 2021, 1:48 PM
Differential Revision
D6264: tarball: Try to get archive format before unpacking it
Parents
rDCOREe45733e9b47d: tarball: Run unzip in quiet mode
Branches
Unknown
Tags
Unknown
Build Status
Buildable 23621
Build 36862: test-and-buildJenkins console · Jenkins