Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #1204 (assigned defect)

Opened 3 months ago

Last modified 3 months ago

tango.io.compress.Zip does not store file attributes

Reported by: un_guru Assigned to: larsivi (accepted)
Priority: normal Milestone: 0.99.8
Component: IO Version: 0.99.6 Jeff
Keywords: Zip createArchive Cc: schveiguy

Description

tango.io.compress.Zip.createArchive will create the archive but does not store file attibutes (like time modified)

Change History

07/23/08 14:34:51 changed by larsivi

  • owner changed from kris to larsivi.
  • status changed from new to assigned.

OS please?

07/23/08 17:52:31 changed by larsivi

On linux I observe weird times, but more or less correct dates. They're not non-existant though.

07/24/08 12:07:15 changed by schveiguy

  • cc set to schveiguy.

Most likely this is due to the same compiler bug as #1191.

Try changing the zip source to use the same workaround as detailed in #1191, and see if it 'fixes' the problem.

If that's the case, then this also will be dependent on the compiler being fixed.

07/24/08 14:09:36 changed by un_guru

os : Windows XP SP3


code: module testzip;

import tango.io.compress.Zip; import tango.io.vfs.FileFolder?;

pragma(lib, "zlib.lib");

void main() {

char[][] files; auto root = new FileFolder? ("."); foreach (file; root.tree.catalog ("*.d"))

files ~= file.toString;

createArchive("test.zip", Method.Deflate, files);

}


command line: bud testzip -clean -exec


the resulting application creates zip files and the zip file does store filetimes, but not the correct, and sometimes you'll get a file with time set to 10:62 and windows will show 01.01.1980 00:00 time for that file

07/24/08 16:59:48 changed by schveiguy

(In [3797]) Fixed date/time handling code references #1204

07/24/08 17:09:35 changed by schveiguy

I take back that it was due to the compiler bug. There were two issues. One that was fixed in the above changeset is that the time code was completely incorrect.

The other is that createArchive doesn't currently read the date/time of the file to store with the zip archive. Whether that was intentional, I'm not sure. I would think it would be the most intuitive, but I didn't write the code so...