If I have zip file which has subfolders and files in it. In some cases the ArchiveLibrary is not able to extract the zip file correctly. This seems be related that if I do this:
zf = zipfile.ZipFile(zfile)
print zf.namelist()
It will only print the files. Example:
['path1/file1.txt', 'path1/file2.txt', ...]
The archive library seems to expect that also paths are also included in the zf.namelist(). Example:
['path1', 'path1/file1.txt', 'path1/file2.txt', ...]
But one create zip file with -no-dir-entries [1] flag in Linux and then the print zf.namelist() will only list the paths to files and zip file does not contain directory entries. Then the ArchiveLibrary fill fail on this stack trace:
DEBUG Traceback (most recent call last): File "C:\Python27\lib\site-packages\ArchiveLibrary\keywords.py", line 43, in extract_zip_file unzipper.extract(zfile, dest) File "C:\Python27\lib\site-packages\ArchiveLibrary\utils.py", line 41, in extract outfile = open(os.path.join(dest, name), 'wb'