Share

rubyzip

Tracker: Bugs

5 Directory unzip error on Vista - ID: 2777700
Last Update: Tracker Item Submitted ( nobody )

I bundle my Ruby application in a zip file that I created using Rubyzip
(0.9.1, installed with Windows Installer 1.8.6-26) that fails to cleanly
unzip on Vista.

Vista complains with error code 0x80004005 ("unspecified error") from its
own Extract All command whenever it tries to unzip a subdirectory in the
zip file. You can retry, skip, or cancel. Retrying causes the same error.
Skipping gets past the problem
and the subdirectory and its contents are unzipped correctly.

I am including the rakefile below that I use to create the zip:


print "IAN packager\n"
print "This rakefile requires that rubyzip has been installed\n"

require 'zip/zipfilesystem'

IAN = "Ian.zip"

def zipFiles(zipFile,fileSpec)
Dir[fileSpec].each do | filename |
print "Zipping ",filename,"\n"
zipFile.add(filename,filename)
end
end

def zipDir(zipFile,directory)
zipFile.dir.mkdir(directory)
Dir.entries(directory).each do | filename |
next if filename == "." or filename == ".."
print "Zipping ",directory,"\\",filename,"\n"
name = directory + "\\" + filename
zipFile.add(name,name)
end
end

task :default => [:build]

dependencies =
FileList['*.rb','*.rbw','*.dat','*.dll','*.so','*.bmp','*.png',
'options/*.rb','analyses/*.rb','imagetypes/*.rb','reports/*.rb']

file IAN => dependencies do |t|

print "Building ",t.name,"\n"

File.delete(IAN) if FileTest.exists?(IAN)

Zip::ZipFile.open(IAN, Zip::ZipFile::CREATE) do |zipFile|
zipFiles(zipFile,"*.rb")
zipFiles(zipFile,"*.rbw")
zipFiles(zipFile,"*.dat")
zipFiles(zipFile,"*.dll")
zipFiles(zipFile,"*.so")
zipFiles(zipFile,"*.bmp")
zipFiles(zipFile,"*.png")
zipDir(zipFile,"options")
zipDir(zipFile,"analyses")
zipDir(zipFile,"imagetypes")
zipDir(zipFile,"reports")
end

print t.name," built!\n"
end

task :build => [IAN] do
print "Done.\n"
end


Nobody/Anonymous ( nobody ) - 2009-04-21 18:16

5

Open

None

Nobody/Anonymous

None

None

Public


Comments




Log in to comment.

No follow-up comments have been posted.

Attached File

No Files Currently Attached

Change

No changes have been made to this artifact.