masamitsu-murase / seven_zip_ruby

Ruby gem library to compress/extract 7-Zip archives
Other
65 stars 20 forks source link

Invalid file format when opening multi-part archive #7

Open cheshire137 opened 10 years ago

cheshire137 commented 10 years ago

I'm trying to open a multi-part 7zip archive. I have tested opening the archive in 7zip in Windows and it opens fine, so the archive is valid.

>> path = 'test-multi.7z.001'
>> File.open(path, 'rb') {|file| SevenZipRuby::Reader.open(file) {|szr| szr.extract(:all) } }
StandardError: Invalid file format. open
  from /Users/me/.rvm/gems/ruby-2.0.0-p353/gems/seven_zip_ruby-1.2.0/lib/seven_zip_ruby/seven_zip_reader.rb:227:in `open_impl'

There are two files, test-multi.7z.001 and test-multi.7z.002. When I extract 001 in Windows in 7zip, it automatically grabs part 002 when it needs it and extracts the whole archive.

masamitsu-murase commented 10 years ago

Thank you for your report.

Currently, this library has not supported multi-part archive yet. Multi-part will be supported by the future version.