I am using the ZipFile method in the System.IO.Compression library. Here is the simple function I have written :
public void zipUnzip()
{
string zipPath = @"C:\zipped_folder.zip";
string extractPath = @"C:\extract";
ZipFile.ExtractToDirectory(zipPath, extractPath, true);
}
I am able to unzip the file manually, in windows explorer but when I execute the above function I get the error :
System.IO.InvalidDataException: 'End of Central Directory record could not be found.'
Not quite sure how to troubleshoot this now. Can someone please help?