More .Net Zip Library/Utility updates

[Update:  this code has been moved to a codeplex project: there for the latest source for ths .NET Zip/compression library.  It does ZIP, ZIP64, SFX, passwords, unicode, and streams. All zips are fully interoperable. ]  

I updated the Zip library again, this time to support the adding of fully qualified files or directories.

A couple people commented that the library did not handle fully-qualified pathnames properly.  Hmmm, I guess I need to embrace Test Driven Development a little more tightly eh?  The zipfile that got produced would be un-readable by Windows. 

I’ve changed the zip library to correct that. 


Comments (4)

  1. I’m trying to use this library, but when I call AddFile("C:/1/2/3/image.png") the resulting zip has folders 1/2/3 and then image.png inside of there. How can I just get it to add image.png to the zip without the folder structure?

  2. cheeso says:

    One way is to change the current working directory to the given directory, and then zip the image.png file.  

    another way is to zip files that are only in the local directory.  

  3. How do I change the current working directory?

  4. cheeso says:

    Keep in mind the current directory is application-scoped.  When you set it with this class lib, the current directory applies to the entire process.