haf / DotNetZip.Semverd

Please use System.IO.Compression! A fork of the DotNetZip project without signing with a solution that compiles cleanly. This project aims to follow semver to avoid versioning conflicts. DotNetZip is a FAST, FREE class library and toolset for manipulating zip files. Use VB, C# or any .NET language to easily create, extract, or update zip files.
Other
545 stars 218 forks source link

"A file cannot be created if it already exists" error even if i choose to OverwriteSilently #244

Open ClonkAndre opened 2 years ago

ClonkAndre commented 2 years ago

This is the code i'm using How can i fix this issue?

using (ZipFile zip = ZipFile.Read(fileLoc)) {
zip.ExtractProgress += Zip_ExtractProgress;

totalFiles = zip.Count;
progress = 0;

foreach (ZipEntry entry in zip) {
    progress++;
    zipEntry = entry;
    entry.ExtractExistingFile = ExtractExistingFileAction.OverwriteSilently;
    entry.ZipErrorAction = ZipErrorAction.Skip;
    entry.Extract(instance.s1_SelectIVExe.IVInstallDirectory, ExtractExistingFileAction.OverwriteSilently);
}
}

Thanks!