digitalmars.D.bugs - ZipArchive doesn't generate valid zip files
- Carlos Santander (26/26) Jun 06 2006 What the subject says. It can read well, though, but it can't even read ...
- Walter Bright (2/4) Jun 07 2006 Are you interested in tracking down what is going wrong?
- Carlos Santander (5/10) Jun 07 2006 Currently no, sorry. I found another way to keep going. FYI, unzip doesn...
- Walter Bright (2/3) Jun 10 2006 It compiles and runs without error with dmd.
- Carlos Santander (4/8) Jun 10 2006 I wonder if it's a gdc or a ppc specific problem. Thanks for testing, th...
What the subject says. It can read well, though, but it can't even read it's own files. //-------------------------------- import std.date; import std.zip; void main () { static ubyte [] buf = [1,2,3,4,5,0,7,8,9]; auto ar = new ZipArchive; auto am = new ArchiveMember; // 10 am.name = "buf"; am.expandedData = buf; am.compressionMethod = 8; am.time = toDosFileTime (getUTCtime ()); ar.addMember (am); // 15 auto zip1 = ar.build (); ar = new ZipArchive (zip1); } //-------------------------------- When I run it, I get "Error: ZipException: invalid directory entry 3" (what does that mean, anyway?) If I comment lines 10 to 15 (ie, I don't add a member to the zip, I don't know if that's valid or not), I get "Error: ZipException: no end record". Tested with gdc 0.18 on Mac OS X. -- Carlos Santander Bernal
Jun 06 2006
Carlos Santander wrote:What the subject says. It can read well, though, but it can't even read it's own files.Are you interested in tracking down what is going wrong?
Jun 07 2006
Walter Bright escribió:Carlos Santander wrote:Currently no, sorry. I found another way to keep going. FYI, unzip doesn't like the generated zips either, so there's something wrong with the format. -- Carlos Santander BernalWhat the subject says. It can read well, though, but it can't even read it's own files.Are you interested in tracking down what is going wrong?
Jun 07 2006
Carlos Santander wrote:Tested with gdc 0.18 on Mac OS X.It compiles and runs without error with dmd.
Jun 10 2006
Walter Bright escribió:Carlos Santander wrote:I wonder if it's a gdc or a ppc specific problem. Thanks for testing, though. -- Carlos Santander BernalTested with gdc 0.18 on Mac OS X.It compiles and runs without error with dmd.
Jun 10 2006