Ticket UUID: | 04cba6a00145ab597dabc48ad5ee688496a57650 | ||
Title: | 7-Zip is unable to open Zip files generated by Fossil | ||
Status: | Fixed | Type: | Code_Defect |
Severity: | Important | Priority: | |
Subsystem: | Resolution: | Fixed | |
Last Modified: | 2009-06-20 23:07:07 | ||
Version Found In: | 266b6127f6 | ||
Description & Comments: | |||
Zip files downloaded from Fossil can not be opened with the 7-Zip program. After some poking in the Zip File Format Specification, I found that the "disk number start" field in the File Header of the Central directory structure was set to 1 instead off 0.
The following patch solves this problem: --- Fossil-266b6127f6/src/zip.c 2009-06-20 11:06:00 +0000 +++ Fossil-266b6127f6-new/src/zip.c 2009-06-20 21:35:42 +0000 @@ -194,7 +194,7 @@ put16(&zBuf[bad-link: 28]28, nameLen); put16(&zBuf[bad-link: 30]30, 0); put16(&zBuf[bad-link: 32]32, 0); - put16(&zBuf[bad-link: 34]34, 1); + put16(&zBuf[bad-link: 34]34, 0); put16(&zBuf[bad-link: 36]36, 0); put32(&zBuf[bad-link: 38]38, ((unsigned)(0100000 | 0644))<<16); put32(&zBuf[bad-link: 42]42, iStart); -- Thomas Schnurrenberger drh added on 2009-06-20 23:07:07: |