Web lists-archives.com

[PHP] zipArchive class extractTo failing

I am getting the warning below from this code:

// self::$_zipper is initialized in class constructor method.
if(self::$_zipper->extractTo($_dest) === false)
$_out['error'] = $_errHead." error: ".$_zip['name']." not extracted: "
   return $_out;

Not a directory in /<path>/dev_lab_current/php/lab_archiver.php</b> on line 179
( + error string returned in $_out['error'])

But what actually happens is that the zip is partially extracted.

It is created by zipArchive::open and an initializer is added by addFromString. Then a series of files are added with a directory name prepended ( pattern: dirname/filename)

What is extracted is the initializer file only.

However, if I download the zip file to client desktop and unzip it (on Mac OSX) the zip has been created
as intended.

How should I interpret the warning? What's "Not a directory"?

I had code to createEmptyDir and add the files to the empty dir, but it was failing.

Thanks for time and attention:

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php