Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
-
None
-
Linux
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Description
In the current snapshot of the ZipArchive class of commons compress seems to be an OS/VM-related problem with the unpack() method of ZipArchive.
I got an IOException using unpack() for a simple jar-archive.
I figured out that the files from the ZipEntries couldn't be created because of missing parent directories.
I fixed the problem by including the usage of the forceMkdir() of the commons-io FileUtils class in the unpack() method. In case you want to use my fix:
// ... for every entry
File outFile = new File(fosString);
if (outFile.getParentFile() != null && !outFile.getParentFile().exists())
FileOutputStream fos = new FileOutputStream(outFile);
// ... write to filestream
best regards,
chris