I need a code review badly. I have a zip class that is using java.util.zip, and everything works great - except when I try to zip something up on Windows (this doesn't happen on Mac).
The bug is that my code is not zipping stuff up the same way ZipGenius, WinZip, or even the IPWorks Java Zip API is doing it. All of these things work, but mine is causing a corrupted ODT file for OpenOffice. My suspicion is that the problem lies somewhere in the relativePath variable, or at least something to do with the directory structure of the zip.
Got it. Zip files (not even ones that windows Compression or WinZip makes) don't use the "\" File separator character. they always use "/". So When I changed all the places you had File.separator to "/" I could open the odt files in OpenOffice without a problem. [ August 20, 2008: Message edited by: Steve Luke ]
posted 10 years ago
Steve...I don't know what to say. You have solved what every other Java forum out there couldn't figure out. I've been to Sun, OpenOffice, and NeoOffice forums, and they all couldn't figure it out.