Problems with Rubyzip

B

billbell52

I am having a problem with Rubyzip when I try to archive numerous
large files. It runs fine for 63 files. The zip is about 250Meg when
it fails. If I skip the file that fails then the next file fails. I
am waiting on IT to install rubyzip on Linux and I will try it there.
I tried it on another archive and it fails about 500Meg. When it
fails if I check the zip (zip -T) it is a good zip file. The file it
fails on does get in there. It appears to failing at the end of the
commit. If I run it again it fails in exactly the same spot so it is
not a network error.

Any ideas on what may be causing this?

Setup
Running on PC over Samba.
rubyzip 0.9.1 (latest version)


zipFile = Zip::ZipFile.open(curZipFile, true)
addToZip(zipFile, toFile, stageFile)

def addToZip(zipFile, toFile, stageFile)
begin
zipFile.add(toFile, stageFile)
@logFile.write("zip #{stageFile} to #{toFile}\n")
zipFile.commit
k = 1
rescue SystemCallError
$stderr.print "IO failed: " + $!
@logFile.write("IO failed: " + $!)
@logFile.close
raise
end
end

***This is my error from the rescue section
IO failed: Invalid argument - s:/links/apex_arch/
F741566A_d741566af1sf18/F741566A_d741566af1sf18_01.zip.2984.1

c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/zip.rb:974:in
`write': Invalid argument - s:/links/apex_arch/F741566A_d741566af1sf18/
F741566A_d741566af1sf18_01.zip.2984.1 (Errno::EINVAL)

from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:974:
in `<<'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:974:
in `copy_raw_entry'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:808:
in `write_to_zip_output_stream'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:1482
:in `commit'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:1123
:in `each'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:1123
:in `each'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:1482
:in `commit'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:937:
in `open'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:1479
:in `commit'
from c:/ruby185/lib/ruby/gems/1.8/gems/rubyzip-0.9.1/lib/zip/
zip.rb:1568
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top