no, it is getting past that

zipFile = createObject("java","java.util.zip.ZipFile");
zipFile.init(zipFilePath);
//Get Entry Objects for Entries in the ZIP File
entryList = zipFile.entries();

//Create List of File Names from the ZIP File
while(entryList.hasMoreElements()) {
     entry = entryList.nextElement();
<======  dies here
     if (not entry.isDirectory()) {
         fileList = ListAppend(fileList,entry.getName());
    }
  }

message = invalid LOC header (bad signature)

This kills jRun so I can't catch it in ColdFusion


On 5/18/07, Maximilian Nyman <[EMAIL PROTECTED]> wrote:
>
> <cftry>
>     <cfset zipfile=CreateObject("java",
> "java.util.zip.ZipFile").init(zipFileName) />
> <cfcatch type="any">
>     <cfdump var="#cfcatch#" />
> </cfcatch>
> </cftry>
>
> That should throw a ZipException (and dump it) if the Zip file is corrupt
>
> /Max
>
>
> On 5/18/07, AJ Mercer <[EMAIL PROTECTED]> wrote:
> > cffile does not crash when using cffile with read or readbinary
> >
> >
> >
> > On 5/17/07, Jake Churchill <[EMAIL PROTECTED]> wrote:
> > >
> > > Can't you just read the file as a file object inside a try/catch and
> if it
> > > fails, the file is assumed to be corrupt
> > >
> > > _____
> > >
> > >
> > >
> > > Jake Churchill
> > >
> > > CF Webtools
> > >
> > > 11204 Davenport, Ste. 200b
> > >
> > > Omaha, NE  68154
> > >
> > > http://www.cfwebtools.com
> > >
> > > 402-408-3733 x103
> > >
> > > -----Original Message-----
> > > From: AJ Mercer [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, May 17, 2007 1:32 AM
> > > To: CF-Talk
> > > Subject: java unzip :: verify file
> > >
> > > Hi,
> > >
> > > I have a cf script that is using java.util.zip.ZipFile to unzip -
> works
> > > great, except when...
> > >
> > > If the zip if corrupt it kills jRun.
> > >
> > > Does any one know if there is a way to verify / check the zip file to
> > > ensure
> > > it is not corrupt?
> > >
> > >
> > > Because it is dieing at the jRun level, I can not use cfcatch.
> > >
> > >
> > >
> > >
> > >
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Upgrade to Adobe ColdFusion MX7
The most significant release in over 10 years. Upgrade & see new features.
http://www.adobe.com/products/coldfusion?sdid=RVJR

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:278546
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to