Allow system images larger than 2GiB, pt. 2
We need to patch zipfile during close() too, because it refers to the ZIP64 file size threshold when writing out the central directory Bug: 18015246 Bug: 19888174 Change-Id: I1b49d653d0831fcc2106808f86c929d7a2b22ff3 Signed-off-by: Greg Hackmann <ghackmann@google.com>
This commit is contained in:
@@ -141,7 +141,13 @@ def main(argv):
|
||||
|
||||
finally:
|
||||
print "cleaning up..."
|
||||
# http://b/18015246
|
||||
# See common.py for context. zipfile also refers to ZIP64_LIMIT during
|
||||
# close() when it writes out the central directory.
|
||||
saved_zip64_limit = zipfile.ZIP64_LIMIT
|
||||
zipfile.ZIP64_LIMIT = (1 << 32) - 1
|
||||
output_zip.close()
|
||||
zipfile.ZIP64_LIMIT = saved_zip64_limit
|
||||
shutil.rmtree(OPTIONS.input_tmp)
|
||||
|
||||
print "done."
|
||||
|
Reference in New Issue
Block a user