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

Cannot read that as a ZipFile Unexpected size (0x0001) for Extended Timestamp extra field at position xxx #277

Open crackleeeessyp opened 1 year ago

crackleeeessyp commented 1 year ago

I have a zip file that can be open and extract by zip software, however, when I use this library to open this file, it show the error as below:

Cannot read that as a ZipFile  Unexpected size (0x0001) for Extended Timestamp extra field at position 0x0000000001C0A8EB

Not sure what's wrong with it, and is there a workaround to make it work?

jshergal commented 1 year ago

It would be helpful if you could provide some sample code and a sample zip file that reproduce this issue. Also, when you say that it can be opened and extracted by "zip software" is there a particular zip software you are referring to?

crackleeeessyp commented 1 year ago

It can be read and extract by 7z, and can also be extract by the c# build in zip API: System.IO.Compression.ZipFile.ExtractToDirectory, but cannot be read by dotnet zip: ZipFile.Read(zipPath) and will throw exception:

Cannot read that as a ZipFile Unexpected size (0x0001) for Extended Timestamp extra field at position xxx

This is the test zip file:

Due to the size limitation, I upload it here: https://wwbu.lanzoum.com/ikdY60mrxn7i