From: Dan Date: 2006-10-18T01:50:09+09:00 Subject: rubyzip problem / question Hi, I'm fairly new to ruby and am trying to use the rubyzip library (I downloaded the latest gem) to change a directory name in a zipped file. The code below seems to work (i.e. the directory names show as changed in winzip), but I get "crc errors" when I try to actually decompress the file. I'd really like to avoid the overhead of unzipping and re-zipping each file. Any suggestions would be greatly appreciated! require 'zip/zip' target = "test.zip" Zip::ZipFile.open(target) do |zipfile| zipfile.each do |e| if !e.directory? and e.to_s.include? "olddir" zipfile.rename(e.to_s, e.to_s.gsub("olddir", "newdir")) end end end - Dan