Fix #234. Add special variable what is a flag about internal usege

This commit is contained in:
Alexander Simonov 2015-06-07 17:29:54 +03:00
parent faa45ef5b6
commit d289780072
2 changed files with 2 additions and 1 deletions

View File

@ -496,6 +496,7 @@ module Zip
end
else
zis = ::Zip::InputStream.new(@zipfile, local_header_offset)
zis.instance_variable_set(:@internal, true)
zis.get_next_entry
if block_given?
begin

View File

@ -130,7 +130,7 @@ module Zip
end
if @current_entry && @current_entry.gp_flags & 8 == 8 && @current_entry.crc == 0 \
&& @current_entry.compressed_size == 0 \
&& @current_entry.size == 0
&& @current_entry.size == 0 && !@internal
raise GPFBit3Error,
'General purpose flag Bit 3 is set so not possible to get proper info from local header.' + \
'Please use ::Zip::File instead of ::Zip::InputStream'