8000 Fix in example_recursive by pol0nium · Pull Request #270 · rubyzip/rubyzip · GitHub
[go: up one dir, main page]

Skip to content

Fix in example_recursive #270

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

Merged
merged 1 commit into from
Jan 22, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix in example_recursive
Replacing 'puts' with 'write' as 'puts' was adding extra lines in files,
damaging them. Ref : #260
  • Loading branch information
pol0nium committed Jan 20, 2016
commit fb0b58c08a34d555060e12f1f8cd479e9a453801
2 changes: 1 addition & 1 deletion samples/example_recursive.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def recursively_deflate_directory(disk_file_path, io, zip_file_path)

def put_into_archive(disk_file_path, io, zip_file_path)
io.get_output_stream(zip_file_path) do |f|
f.puts(File.open(disk_file_path, 'rb').read)
f.write(File.open(disk_file_path, 'rb').read)
end
end
end
0