8000 Replacing 'puts' with 'write' as 'puts' was adding extra lines in files, · pol0nium/rubyzip@c19ecd0 · GitHub
[go: up one dir, main page]

Skip to content

Commit c19ecd0

Browse files
committed
Replacing 'puts' with 'write' as 'puts' was adding extra lines in files,
damaging them. Ref : rubyzip#260
1 parent 560bf5d commit c19ecd0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

samples/example_recursive.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def recursively_deflate_directory(disk_file_path, io, zip_file_path)
5151

5252
def put_into_archive(disk_file_path, io, zip_file_path)
5353
io.get_output_stream(zip_file_path) do |f|
54-
f.puts(File.open(disk_file_path, 'rb').read)
54+
f.write(File.open(disk_file_path, 'rb').read)
5555
end
5656
end
5757
end

0 commit comments

Comments
 (0)
0