Skip to content
This repository has been archived by the owner on May 15, 2024. It is now read-only.

Copy of ZipEntry to another ZipFile does not copy the content #269

Open
nikolay-tzonev opened this issue Nov 20, 2022 · 0 comments
Open

Comments

@nikolay-tzonev
Copy link

I am trying to merge the content of multiple zip files into one without unzipping and zipping the files.

I wanted to use the ZipEntry.CloneForNewZipFile(ZipFile) method to clone the entries and add them to the new ZipFile. However after saving the merged ZipFile only the headers appear to be copies and none of the compressed content.

I tracked the problem to line 2561 in .\src\Zip.Shared\ZipEntry.Write.cs

this._TotalEntrySize = this._LengthOfHeader + this._CompressedFileDataSize + _LengthOfTrailer;

where this._CompressedFileDataSize was 0. It never got initialized when calling ZipEntry.CloneForNewZipFile(ZipFile)

Can you please fix this?

Thank you!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant