Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c4a1b87d authored by Greg Hackmann's avatar Greg Hackmann Committed by Gerrit - the friendly Code Review server
Browse files

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
parent 8121e974
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -139,7 +139,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."