Here's what I'm seeing: when I attempt to zip up a directory, a weird forking of some sort happens. Based on the documentation in the DRK, I'm doing the code like this:
<cfscript>
myZip = CreateObject("component", "com.macromedia.util.zip.Zip");
myZip.addFilePath("/images", "c:\Inetpub\wwwroot\test\images");
myZip.saveZipFile("c:\testZip.zip");
</cfscript>
as you see in the code sample below. What I am assuming this should do is create a "/images" path in my zip file, and also include all the files within C:\Inetpub\wwwroot\test\images. I'm using a few images and the zip file turns out to be 43K, so that all seems good.
The problem arises when I go to unzip the zip file. If I just unzip it using the built-in extraction in Windows XP or CuteZip (as well as StuffIt on a Mac), the resulting folder is empty. Not even the /images path shows up. If I actually *open* the zip file in either CuteZip on the PC or StuffIt on the Mac, however, I see two things. First, I see "something" (and I say "something" because I don't know if it's a file or what) called "images". It's 1K in size. No extension and it's not a folder, it's just "something" called image. The other thing I see is a directory called "images" and inside this directory, the contents of the top level directory simply repeat themselves. In other words, in the top level directory I see something called images, and an images directory. If I go into the images directory, I see this same thing again, and if I look at the tree view of the zip structure, in this instance that images directory repeats itself 20 times, one directory within another.
I'm hoping I'm just missing something with the documentation and how you're supposed to zip up an entire path, but since I've seen this behavior consistently on both my Mac and my PC, I figured I'd ask before I spent too much more time on it.
Thanks,
Matt Woodward
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]