Reputation: 11
I have updated zlib from 1.2.11 to 1.2.12. After this updating, RubyZip doesn't work well, The following code generates a zip file includeing a empty file named test.txt. In the environment using older version of zlib, the following code generates a zip file including a text file containing the text of "Hello World!"
Is there anyone who knows the way to get rid of this problem?
require 'zip'
require 'zlib'
Zip::OutputStream.open("test.zip", Zip::TraditionalEncrypter.new("password")) do |zip|
zip.put_next_entry("test.txt")
zip.print("Hello World!\n")
end
I'd like to know how to create a zip file with password using rubyzip with zlib v1.2.12 or later.
Upvotes: 1
Views: 163