You are not logged in.
Pages: 1
Hello to all,
I try to move my application to 64 bit architecture (Delphi XE3).
I found the problem with reading ZIP file.
constructor TZipRead.Create(BufZip: pByteArray; Size: cardinal);
...
for i := 1 to lhr^.totalFiles do begin // totalFiles = 10
if H^.signature+1<>$02014b51 then begin
UnMap;
raise ESynZipException.Create('ZIP format');
end;
lfhr := @BufZip[H^.localHeadOff];
with lfhr^.fileInfo do
if flags and (1 shl 3)<>0 then begin // crc+sizes in "data descriptor"
if (zcrc32<>0) or (zzipSize<>0) or (zfullSize<>0) then
raise ESynZipException.Create('ZIP extended format');
// UnZip() will call RetrieveFileInfo()
end else
if (zzipSize=0) or (zfullSize=0) then
raise ESynZipException.Create('ZIP format size=0') else // - Exception here
The zip file can be downloaded from:
Offline
Ups. In win32 does not works too.
Offline
How was this .zip created?
The local file header seems void.
Sounds incorrect, as reported by 4.4.8 and 4.4.9 of http://www.pkware.com/documents/casestudies/APPNOTE.TXT
We would provide a workaround.
Edit: sounds like if it is just a directory stored within the zip.
Offline
The file was created by standalone 32 bit WinZip. In the previous version of SynZip this file unzipped successfully.
Offline
Yes, there was a regression when a .zip contained folders.
Should be fixed by http://synopse.info/fossil/info/b55f4a2dd6
Thanks for the feedback.
Offline
Thank you so much for the patch.
Offline
Pages: 1