❔ Not able to read Entries of a zip file

Hello everyone 🙂 I am trying to read a zip file in a dotnet Framework 4.7.2 Project using the code below:
using(var archive = new ZipArchive(stream)) {
//get all the xml applicant files in the zip
var xmlRepresentativeFiles = archive.Entries.Where(ent => Path.GetExtension(ent.Name) == ".xml").ToList();
}
using(var archive = new ZipArchive(stream)) {
//get all the xml applicant files in the zip
var xmlRepresentativeFiles = archive.Entries.Where(ent => Path.GetExtension(ent.Name) == ".xml").ToList();
}
However I get an exception saying "Number of entries expected in End Of Central Directory does not correspond to number of entries in Central Directory." I can't seem to figure why this is happening. I tested the file using 7zip and noticed this warning: warning 16-bit overflow for number of files in headers Have added some screenshots for reference. This is the link to the zip file I'm using: https://easyupload.io/gx66wn Would be grateful if someone pointed me in the right direction here 🙂
2 Replies
Cisien
Cisien2y ago
Bad zip file?
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server