Class: Zip::CentralDirectory
Overview
:nodoc:
Instance Method Summary collapse
-
#write_to_stream(io) ⇒ Object
Patch to add entries in alphabetical order.
Instance Method Details
#write_to_stream(io) ⇒ Object
Patch to add entries in alphabetical order.
35 36 37 38 39 40 41 |
# File 'lib/buildr/packaging/zip.rb', line 35 def write_to_stream(io) offset = io.tell @entry_set.sort { |a,b| a.name <=> b.name }.each { |entry| entry.write_c_dir_entry(io) } eocd_offset = io.tell cdir_size = eocd_offset - offset write_e_o_c_d(io, offset, cdir_size) end |