You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've run the example_recursive with some binary files , but after extract I found some files will lost special characters ( for example 0x1a is lost at file end ) .
Modify def put_into_archive(disk_file_path, io, zip_file_path) io.get_output_stream(zip_file_path) do |f| f.write(File.open(disk_file_path, 'rb').read) end end
to def put_into_archive(disk_file_path, io, zip_file_path) io.add(zip_file_path, disk_file_path) end
could fix this issue .
The text was updated successfully, but these errors were encountered:
EagleSHCN
added a commit
to EagleSHCN/rubyzip
that referenced
this issue
Aug 15, 2016
…in file
example_recursive.rb lost some special characters ( for example 0x1a at file end ) , it should related to io stream implementation . Use internal zip add method instead of File.read could avoid this lose .
An issue is posted at rubyzip#296
I've run the example_recursive with some binary files , but after extract I found some files will lost special characters ( for example 0x1a is lost at file end ) .
Modify
def put_into_archive(disk_file_path, io, zip_file_path) io.get_output_stream(zip_file_path) do |f| f.write(File.open(disk_file_path, 'rb').read) end end
to
def put_into_archive(disk_file_path, io, zip_file_path) io.add(zip_file_path, disk_file_path) end
could fix this issue .
The text was updated successfully, but these errors were encountered: