commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: [compress] not able to set extra field ExtendedTimestamp using commons.compress.archivers.zip
Date Mon, 04 Nov 2013 11:27:19 GMT
On 2013-11-03, yogeshrai wrote:

> Thnx a lot Stefan for prompt reply.I did made necessary change as suggested
> by u.Still even when i set all 3 date types to old date and then try to
> extract via default archive manager , m stuck with current date time for
> individual files bundled in.

I may have been a bit unclear on setFlags, here is the rub:

> 					xf.setFlags((byte) 4);

this only sets the flag for the creation time, what you expect to see is
the modification time.

The flags is 1 for modification time plus 2 for access time plus 4 for
creation time.  So it should be 7 in your case.

For this I've created a new unit test with
<http://svn.apache.org/viewvc/commons/proper/compress/trunk/src/test/java/org/apache/commons/compress/archivers/zip/X5455_ExtendedTimestampTest.java?r1=1538560&r2=1538559&pathrev=1538560>
and if I use InfoZIP's unzip on the created archive the resulting last
modified time is the one I set for the extra field.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message