Enable Zip64 (#96)
This commit is contained in:
parent
91f82fd6d3
commit
674e24fc41
@ -153,6 +153,7 @@ class ZipArchiver:
|
||||
zf = zipfile.ZipFile(
|
||||
self.path,
|
||||
mode='a',
|
||||
allowZip64=True,
|
||||
compression=zipfile.ZIP_DEFLATED)
|
||||
zf.writestr(archive_file, data)
|
||||
zf.close()
|
||||
@ -185,7 +186,7 @@ class ZipArchiver:
|
||||
os.close(tmp_fd)
|
||||
|
||||
zin = zipfile.ZipFile(self.path, 'r')
|
||||
zout = zipfile.ZipFile(tmp_name, 'w')
|
||||
zout = zipfile.ZipFile(tmp_name, 'w', allowZip64=True)
|
||||
for item in zin.infolist():
|
||||
buffer = zin.read(item.filename)
|
||||
if (item.filename not in exclude_list):
|
||||
@ -270,7 +271,7 @@ class ZipArchiver:
|
||||
"""Replace the current zip with one copied from another archive"""
|
||||
|
||||
try:
|
||||
zout = zipfile.ZipFile(self.path, 'w')
|
||||
zout = zipfile.ZipFile(self.path, 'w', allowZip64=True)
|
||||
for fname in otherArchive.getArchiveFilenameList():
|
||||
data = otherArchive.readArchiveFile(fname)
|
||||
if data is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user