[postprocessor:zip] add 'mode' option (#355)

This commit is contained in:
Mike Fährmann
2019-07-28 18:13:18 +02:00
parent 6ce22f606b
commit a90280f4e7
2 changed files with 43 additions and 11 deletions

View File

@@ -1465,6 +1465,22 @@ Default ``false``
Description Keep the actual files after writing them to a ZIP archive.
=========== =====
zip.mode
--------
=========== =====
Type ``string``
Default ``"default"``
Description * ``"default"``: Write the central directory file header
once after everything is done or an exception is raised.
* ``"safe"``: Update the central directory file header
each time a file is stored in a ZIP archive.
This greatly reduces the chance a ZIP archive gets corrupted in
case the Python interpreter gets shut down unexpectedly
(power outage, SIGKILL) but is also a lot slower.
=========== =====
Miscellaneous Options