Open stuaxo opened 7 years ago
data = [block for block in entry.blocks]
for entry2 in libarchive.public.memory_pour(data):
if entry2.filetype.IFDIR or dest[-1] == os.path.sep:
if not os.path.exists(dest):
os.makedirs(dest)
else:
try:
with open(dest, 'wb') as f:
try:
for block in entry2.get_blocks():
f.write(block)
except ValueError:
# TODO: add further test when PyEasyArchive is patched
_logger.warn('Probable password encrypted file.')
E.G. - A zip file containing many 7zips, that themselves have files inside ?