mirror of
https://github.com/adamhathcock/sharpcompress.git
synced 2026-02-08 05:27:04 +00:00
[Bug][0.41.0] ZipArchive.ExtractToDirectory method not work #717
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @aaasoft on GitHub (Nov 14, 2025).
Recently,I update SharpComporess from 0.40.0 to 0.41.0 in my project.
I found ZipArchive.ExtractToDirectory method not work.
No file extracted and no exception throwed,nothing happen.
Test Zip file: https://builds.dotnet.microsoft.com/dotnet/aspnetcore/Runtime/10.0.0/aspnetcore-runtime-10.0.0-win-x64.zip
Test code:
using (var archive = SharpCompress.Archives.Zip.ZipArchive.Open("aspnetcore-runtime-10.0.0-win-x64.zip")) archive.ExtractToDirectory("Test");@adamhathcock commented on GitHub (Nov 14, 2025):
Works for me. This example will always put a Test directory in your build output
@aaasoft commented on GitHub (Nov 14, 2025):
@adamhathcock You tested on mac os,but I tested on Windows 10,the bug is still there.
I add some output and a stopwatch,here is my last test code:
Version 0.40.0 test result:
Version 0.41.0 test result:
@Morilli commented on GitHub (Nov 14, 2025):
The underlying cause for this issue is the same as in #960.
@aaasoft commented on GitHub (Nov 15, 2025):
I tested on Debain.Also has this bug.
Version 0.40.0 test result:
Version 0.41.0 test result:
@aaasoft commented on GitHub (Nov 15, 2025):
@adamhathcock @Morilli ZIP file is not SOLID.I think IArchive.ExtractToDirectory method should work with any archive files,not just SOLID archives.
Is this commit cause this bug?
make WriteToDirectory functions use ExtractAllEntries
@adamhathcock commented on GitHub (Nov 19, 2025):
I still an extract on Windows fine it seems
@aaasoft commented on GitHub (Dec 2, 2025):
I found this bug fixed in version 0.42.0