Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FastZip: Raise ProcessDirectory event for extractions #201

Merged
merged 1 commit into from
Aug 15, 2020

Conversation

Stevie-O
Copy link
Contributor

FastZip's ExtractZip method did not raise the ProcessDirectory event when
creating a directory. There was no way to determine or control when
ExtractZip decided to create a new directory.

(This presented an issue when I tried using ExtractZip in conjunction as part of an installation tool with automatic-rollback functionality; it did not rollback the creation of directories, so the cleanup didn't work correctly.)

NOTE: The logic to raise the event only triggers when the target directory
doesn't already exist in the destination.

I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License.

src/ICSharpCode.SharpZipLib/Zip/FastZip.cs Outdated Show resolved Hide resolved
FastZip's ExtractZip method did not raise the ProcessDirectory event when
creating a directory.  There was no way to determine or control when
ExtractZip decided to create a new directory.

NOTE: The logic to raise the event only triggers when the target directory
doesn't already exist in the destination.
@piksel
Copy link
Member

piksel commented Aug 15, 2020

I commited my suggestion and rebased on master, this could be useful for determining if directories were created upon extraction (as per the original description).

@piksel piksel merged commit c557266 into icsharpcode:master Aug 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants