This project is read-only.

Zipfile.Read() not working?

Sep 25, 2008 at 11:01 PM
Edited Sep 25, 2008 at 11:05 PM

I am creating zip files using your library very easily.  But when I try to read and extract them I always get a null reference exception.  Perhaps you can tell me what is wrong with the following code?  I have tried reading both the filestream as well as just passing the path of the zip file but it is not working!  Please help.

FileStream fs = new FileStream(tempFolder + "\\" + fileinfo[0], FileMode.Open, FileAccess.Read);
ZipFile zipFile = ZipFile.Read(fs); 







Sep 26, 2008 at 12:28 AM
I resolved this.  Would help to read the documentation a bit before diving in.  Here is the code that works...



(ZipFile zipFile = ZipFile.Read(tempFolder + "\\" + fileinfo[0]))




Application.StartupPath, true);