Skip to content

Commit 52a7e4f

Browse files
committed
set tempfile to binary mode to prevent corrupted gzip on windows
1 parent b56905c commit 52a7e4f

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/s3_website/upload.rb

+1
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def gzip?
4949

5050
def gzipped_file
5151
tempfile = Tempfile.new(File.basename(path))
52+
tempfile.binmode
5253

5354
gz = Zlib::GzipWriter.new(tempfile, Zlib::BEST_COMPRESSION, Zlib::DEFAULT_STRATEGY)
5455

0 commit comments

Comments
 (0)