Unable to extract files as of v1.9.1.8

Nov 15, 2011 at 3:57 PM

I've noticed that things in the libary have changed from v1.9.1.5.  Now I can't get my tool to extract files since it appears some functionality and/or classes have been removed.

For instance,  I'm working with a progress bar and when it gets to the following following function it dies on the using statement.

 

private void _zipBGWorker_DoWork(object sender, DoWorkEventArgs e)
{

 ZipFile zipfile = (ZipFile)e.Argument;
 string szZipFile = zipfile.Name;

 try
 {
  using (ZipFile zip = ZipFile.Read(szZipFile))
  {
   if (zip.Entries.Count > 0)
   {
    foreach (ZipEntry ze in zip)
    {
     SetProgressBarMax(zip.Entries.Count);
     zip.ExtractProgress += new EventHandler<ExtractProgressEventArgs>(zip_ExtractProgress);
     ze.Extract(ExtractPath, ExtractExistingFileAction.OverwriteSilently);
     //zip.ExtractAll(ExtractPath, ExtractExistingFileAction.OverwriteSilently);
    }
   }
   else
   {
    MessageBox.Show("Empty archive - Nothing to extract", "Error Extracting Training Database",
      MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
   }
  }
 }
 catch (ZipException ex)
 {
  MessageBox.Show(string.Format("There's been a problem extracting zip file.  {0}", ex.Message),
      "Error Extracting", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
 }
 catch (FileNotFoundException ex)
 {
  MessageBox.Show(string.Format("Unable to locate zip file.  {0}", ex.Message),
      "Error Extracting", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
 }
 catch (Exception ex)
 {
  MessageBox.Show(string.Format("There's been a problem extracting zip file.  {0}", ex.Message),
      "Error Extracting", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1);
 }
}

Any help would be greatly appreciated.

Jim

 

Coordinator
Nov 18, 2011 at 12:56 AM

Jim,

"it dies" is not enough information to provide an analysis or diagnosis.  You're going to need to provide more information.

If "it dies" means it throws an exception, then provide the exception, full stacktrace. Also describe the zipfile and any other details that may be pertinent.

 

Nov 21, 2011 at 5:21 PM

Hi Cheeso,

Thanks for getting back to me.

Basically what I mean by “it dies” means that when I step through the code and the application will get into the worker_dowork function, hit the first line of code and the application will quit without any error or exception. I’m not sure how to get it to work at this point. I can send my code if need be.

Jim

From: Cheeso [email removed]
Sent: Thursday, November 17, 2011 8:56 PM
To: Macdiarmid, James D.
Subject: Re: Unable to extract files as of v1.9.1.8 [DotNetZip:279534]

From: Cheeso

Jim,

"it dies" is not enough information to provide an analysis or diagnosis. You're going to need to provide more information.

If "it dies" means it throws an exception, then provide the exception, full stacktrace. Also describe the zipfile and any other details that may be pertinent.