Do not force .zip extension


why the check for a .zip extension in the constructor? I wanted to insure that when creating a zip , people were clear that a zip extension needs to be used. if an app wants to create a .jar (or something else) then the app is free to rename the file that gets created.
FYI, I'm working with two other file formats that use Zip file contents but with a different extension today. This is a pretty common scenario (nee System.IO.Packaging, OPC, SCORM eLearning packages, etc.) You may wish to reconsider whether hardcoding .zip extensions is really a benefit to this library...

There is a reasonable workaround in the Read() option.
Closed Feb 5, 2008 at 8:59 PM by Cheeso
fixed in v1.3


Ketzal wrote Jan 24, 2008 at 10:41 AM

I agree, I'm using System.IO.Path.GetTempFileName() to store uploaded zip files and then extract their content, so these files have a .tmp extension.
I guess that like many file formats, the zip specification contains an header signature which provide a better way to quickly check if a file is a zip file than relying on the file extension.

Cheeso wrote Feb 5, 2008 at 1:07 AM

ok, you've convinced me. I removed the check.

Cheeso wrote Feb 5, 2008 at 8:59 PM

Fixed in change set 14492

** Closed by Cheeso 2/4/2008 6:08 PM

Cheeso wrote Feb 5, 2008 at 8:59 PM

re-opening to assign to a release.