Bug 76791

Summary: KZip fails on some (corrupt?) zip files
Product: [Unmaintained] kio Reporter: Robby Stephenson <robby>
Component: zipAssignee: David Faure <faure>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Mandrake RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: The sample zip file that KZip fails to open

Description Robby Stephenson 2004-03-05 05:06:48 UTC
Version:            (using KDE KDE 3.2.0)
Installed from:    Mandrake RPMs

This is probably not a true bug in KZip, but just a robustness problem. If the same data is written to the same file in the archive (KZip::writeFile(..)), something gets corrupted and KZip can't re-open the resulting file. I'll attach a sample zip file that both ark and file-roller can open, but trying to open it in konqueror with (I assume) the kio_zip slave gives me a "does not exist" error. I also wrote a short test program to load the file into a KZip object, and the error I get then is

WARNING: Invalid ZIP file. Unexpected end of file. (#1)

So I figure it's a bug in my program to be writing the data twice, but it'd be nice for KZip to be a bit more robust and open the file anyway.
Comment 1 Robby Stephenson 2004-03-05 05:07:48 UTC
Created attachment 5032 [details]
The sample zip file that KZip fails to open
Comment 2 Jo Øiongen 2004-07-30 09:57:29 UTC
It looks like the problem is that the zip file only contains files (sort of). If you try to open the zip file in Konqy it try to open it to /home/foo/file. Where the contents of file is displayed within the folder "file". So you get an error that says that the folder named "file" does not exist.

Did anyone understand this???

Cheers Jo
Comment 3 Holger Schröder 2004-08-25 02:37:24 UTC
This Bug should be fixed in cvs HEAD now.