Skip to content

Zip::InputStream reads only first file on some zip files #227

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
lluis opened this issue Mar 31, 2015 · 4 comments
Closed

Zip::InputStream reads only first file on some zip files #227

lluis opened this issue Mar 31, 2015 · 4 comments

Comments

@lluis
Copy link

lluis commented Mar 31, 2015

Hi,
on some zip files Zip::InputStream reads only the first file:

require 'zip'

Zip::File.open('b.zip') do |io|
  io.each do |entry|
    puts "Entry: #{entry.name}"
  end
end

# output:
# Entry: 1_factura_14277089822133838.pdf
# Entry: B632761741427708982713.pdf
# Entry: factura_14277089822133838.xsig
# Entry: RespuestaWS.xml

Zip::InputStream.open(StringIO.new(File.read('b.zip'))) do |io|
  while (entry = io.get_next_entry)
    puts "Entry: #{entry.name}"
  end
end

# output:
# Entry: 1_factura_14277089822133838.pdf

here is the zip example:

https://gist.github.com/lluis/bed8caa5cbccc58d47ac/raw/cb9b4db0289c0018542df72148e752f8dd13aa77/b.zip

@simonoff
Copy link
Member

@lluis
Copy link
Author

lluis commented Mar 31, 2015

@simonoff ok! but no exception is raised

@simonoff
Copy link
Member

Exceptions implemented in master branch

@lluis
Copy link
Author

lluis commented Mar 31, 2015

ok thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants