ZIP64 extension
authorDimitri Papadopoulos <dimitri.papadopoulos@cea.fr>
Mon, 30 Sep 2013 09:04:33 +0200
changeset 395 c56d3cceaead
parent 394 ae247a2bc0ee
child 396 3990d3a0e1a8
ZIP64 extension Use the ZIP64 extension - only when the zipfile is larger than 2 GB.
views/download.py
--- a/views/download.py	Thu Oct 03 16:28:08 2013 +0200
+++ b/views/download.py	Mon Sep 30 09:04:33 2013 +0200
@@ -53,7 +53,7 @@
     fd, archive_filepath = tempfile.mkstemp()
     try:
         noext_archivename = osp.splitext(DataZipAbstractView.archive_name)[0]
-        with closing(ZipFile(archive_filepath, "w", ZIP_DEFLATED)) as zip:
+        with closing(ZipFile(archive_filepath, "w", ZIP_DEFLATED, True)) as zip:
             for filename, subj, filepath in filepaths:
                 zip.write(filepath, '%s/%s/%s' % (noext_archivename, subj, filename))
         fileobj = os.fdopen(fd)