Skip to content

Commit

Permalink
Merge 0b01891 into 8feb070
Browse files Browse the repository at this point in the history
  • Loading branch information
githubmo committed Sep 30, 2013
2 parents 8feb070 + 0b01891 commit 301566b
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/zip/entry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ def read_local_entry(io) #:nodoc:all
# otherwise they'll remain as 0
@data_descriptor_present = (@gp_flags & ::Zip::GP_FLAGS_DESCRIPTOR_PRESENT != 0)
if @data_descriptor_present
pos = io.tell
# We need to seek forwards until we find the data descriptor signature
# (504B0708) or the next record's local file header signature (504B0304)
# and scan back a few
Expand All @@ -264,6 +265,7 @@ def read_local_entry(io) #:nodoc:all
end

@crc, @compressed_size, @size = io.read(12).unpack("VVV")
io.seek(pos)
end
end

Expand Down

0 comments on commit 301566b

Please sign in to comment.