13 April 2007

More .Net Zip Library/Utility updates

[Update:  this code has been moved to a codeplex project:   http://www.codeplex.com/DotNetZipGo 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. 

 

Filed under: ,
 

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Nick Gravelyn said:

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?

07 June 07 at 2:35 AM
# DotNetInterop said:

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.  

07 June 07 at 7:49 PM
# Nick Gravelyn said:

How do I change the current working directory?

07 June 07 at 10:13 PM
# DotNetInterop said:

http://msdn2.microsoft.com/en-us/library/system.io.directory.setcurrentdirectory.aspx

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.

-Dino

11 June 07 at 3:46 PM

Leave a Comment

Comment Policy: No HTML allowed. URIs and line breaks are converted automatically. Your e–mail address will not show up on any public page.

(required) 
(optional)
(required) 

  
Enter Code Here: Required
Page view tracker