I am trying to implement the unpack function in a project that I am currently working on, but the problem is that I have some limitations when it comes to licensing, and I need to stay away from GPL licenses because the project is closed.
So I can no longer use SharpZipLib .. so I switched to the .Net libraries I'm currently trying to work with the ZipArchive library.
The problem is that it is not extracted for directories / subdirectories, so if I have blabla.zip that has file.txt inside and / folder / file 2.txt it will all be extracted to file.txt and file2.txt so it ignores the subdirectory.
I am using an example from the MSDN website. which looks something like this:
using (ZipArchive archive = ZipFile.OpenRead(zipPath)) { foreach (ZipArchiveEntry entry in archive.Entries) { entry.ExtractToFile(Path.Combine(extractPath, entry.FullName)); } }
Any idea how to solve this?
eMizo source share