SharpZipLib icon indicating copy to clipboard operation
SharpZipLib copied to clipboard

FastZip's confirmDelegate (overwrite prompt support) should take ZipEntry

Open iainnicol opened this issue 7 years ago • 1 comments

Description

  1. FastZip has an ExtractZip method.
  2. ExtractZip takes a parameter confirmDelegate. This delegate is executed to determine how to handle files which already exist.
  3. confirmDelegate currently is given the full target path.

Expected behavior

Ideally, confirmDelegate should additionally be passed the ZipEntry. This would allow the delegate to check e.g. the size of the existing file on disk, against the (decompressed) size of the zip entry.

Actual behavior

ExtractFileEntry does not pass confirmDelegate the ZipEntry.

Version of SharpZipLib

master branch on github, as of 2018-10-18. Commit 0008e715ea08e17163bd3eb63d9e4a9e048ad962.

Notes

This would be a trivial change to make... except I presume it would be a breaking API change. And v1.0.0 was only recently released. Thoughts?

iainnicol avatar Oct 18 '18 11:10 iainnicol

Yes, although this functionality would be nice, it's not enough for a new major release :) (I intend to use SemVer and not introduce breaking changes in minor releases)

My suggestion would be to add it as another event, perhaps ExtractZipFileEntry or ExtractFileEntryEx.

piksel avatar Nov 12 '18 19:11 piksel