Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Averting of compression method override #64

Merged
merged 1 commit into from

2 participants

@rap-kasta

Example of code:

::Zip::ZipFile.open("path_to.zip", ::Zip::ZipFile::CREATE) { |zip_content|
        entry_path = "test.txt"
        zip_entry = ::Zip::ZipEntry.new("", entry_path, "", "", 0, 0,::Zip::ZipEntry::STORED)
        zip_content.add zip_entry, entry
      end
  }

Without this fix file "test.txt" will be always compressed (using DEFLATED compression method)

@simonoff simonoff merged commit fbafce3 into rubyzip:master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Sep 14, 2012
  1. @rap-kasta
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/zip/zip_entry.rb
View
2  lib/zip/zip_entry.rb
@@ -543,7 +543,7 @@ def write_to_zip_output_stream(aZipOutputStream) #:nodoc:all
if @ftype == :directory
aZipOutputStream.put_next_entry(self)
elsif @filepath
- aZipOutputStream.put_next_entry(self)
+ aZipOutputStream.put_next_entry(self, nil, nil, nil)
get_input_stream { |is| IOExtras.copy_stream(aZipOutputStream, is) }
else
aZipOutputStream.copy_raw_entry(self)
Something went wrong with that request. Please try again.