[ wxwindows-Patches-1861030 ] ZipStream - Handling archives with 1 or 0 files

SourceForge.net noreply at sourceforge.net
Thu Jan 3 03:27:54 PST 2008


Patches item #1861030, was opened at 2007-12-30 18:18
Message generated for change (Comment added) made by mweth
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1861030&group_id=9863

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: bug fix
Status: Closed
Resolution: Accepted
Priority: 5
Private: No
Submitted By: arst (arst)
Assigned to: Nobody/Anonymous (nobody)
Summary: ZipStream - Handling archives with 1 or 0 files

Initial Comment:
The patch allows removing the last file from a wxZipStream. 

Without the patch, all files except the last one can be removed.

(The Zip format accepts empty archives)

Regards
// ATS

----------------------------------------------------------------------

>Comment By: M.J.Wetherell (mweth)
Date: 2008-01-03 11:27

Message:
Logged In: YES 
user_id=1262351
Originator: NO

The patch isn't right, as you can see by running the test
suite. But I agree with the change in general, however...

> Summary: ZipStream - Handling archives with 1 or 0 files
>
> Initial Comment:
> The patch allows removing the last file from a wxZipStream.
>
> Without the patch, all files except the last one can be removed.

The last file can already be removed, but wxZipOutputStream
outputs nothing for an empty zip rather than just an end
record.

> (The Zip format accepts empty archives)

The spec doesn't say that zips containing just an end record
are valid, and e.g. pkunzip rejects them as invalid.  Anyway
it does makes sense even if not all tools/libs will accept
them, and it's also how the wxTar streams work already, so
it'll make things consistent.

I'll make the change on the dev branch but keep the stable
branch the same.


----------------------------------------------------------------------

Comment By: Vadim Zeitlin (vadz)
Date: 2008-01-02 20:31

Message:
Logged In: YES 
user_id=71618
Originator: NO

Thank you for your patch, it has been applied to both svn trunk and 2.8
branch!

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=309863&aid=1861030&group_id=9863




More information about the wx-dev mailing list