Bug 684957 - optimizejars.py doesn't update disk_entries field, r=taras
authorMichael Wu <mwu@mozilla.com>
Tue, 06 Sep 2011 12:57:36 -0700
changeset 76618 0874dee6bf422805bc159d54063c535a4db9cd9c
parent 76617 5ab4ecc3ff2ca24d4f02a987964c9e4acdf97653
child 76619 4fe3fb96bd377b4b0795c7dcff7ea0d3cbbd1afe
push id3
push userfelipc@gmail.com
push dateFri, 30 Sep 2011 20:09:13 +0000
reviewerstaras
bugs684957
milestone9.0a1
Bug 684957 - optimizejars.py doesn't update disk_entries field, r=taras
config/optimizejars.py
--- a/config/optimizejars.py
+++ b/config/optimizejars.py
@@ -298,16 +298,17 @@ def optimizejar(jar, outjar, inlog = Non
 
     if inlog is None:
         dirend.cdir_offset = out_offset
 
     if dups_found > 0:
         print("WARNING: Found %d duplicate files taking %d bytes"%(dups_found, dupe_bytes))
 
     dirend.cdir_size = len(cdir_data)
+    dirend.disk_entries = dirend.cdir_entries
     dirend_data = dirend.pack()
     assert_true(size_of(cdir_end) == len(dirend_data), "Failed to serialize directory end correctly. Serialized size;%d, expected:%d"%(len(dirend_data), size_of(cdir_end)));
 
     outfd.seek(dirend.cdir_offset)
     outfd.write(cdir_data)
     outfd.write(dirend_data)
 
     # for ordered jars the central directory is written in the begining of the file, so a second central-directory