commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claire Salac (JIRA)" <>
Subject [jira] [Commented] (COMPRESS-135) Original file creation date is not retained when files are added to a zip archive
Date Fri, 24 Jun 2011 11:59:48 GMT


Claire Salac commented on COMPRESS-135:

I use the following:

dest = new FileOutputStream(zipFilePath);
zip = new ZipArchiveOutputStream(dest);
origin = new BufferedInputStream(new FileInputStream(InnerContents[i]));
ZipArchiveEntry zippy = new ZipArchiveEntry(InnerContents[i].getName());

zip.createArchiveEntry(InnerContents[i], InnerContents[i].getName());
while((count = != -1)
     zip.write(data, 0, count);

If what you say is the case then I should still be seeing different dates in the zip archive.
Instead, I see all files have one uniform date: the date the archive was created.

> Original file creation date is not retained when files are added to a zip archive 
> ----------------------------------------------------------------------------------
>                 Key: COMPRESS-135
>                 URL:
>             Project: Commons Compress
>          Issue Type: Bug
>          Components: Archivers
>    Affects Versions: 1.1
>         Environment: Windows XP & Server 2003
>            Reporter: Claire Salac
> I have a Java program using the Apache zip archives library to zip together files with
a common create month. However, when the resulting zip archives are examined the create date
of all the files in the archive has been changed to the date the archive was created. It is
critical that we retain the create date in these archives as they will be used for troubleshooting
at a future date. Is there a way that this can be done currently, or is it something that
will need to be addressed in a future build?

This message is automatically generated by JIRA.
For more information on JIRA, see:


View raw message