zipArchive class extractTo failing

From: Date: Mon, 25 Apr 2016 21:37:26 +0000
Subject: zipArchive class extractTo failing
Groups: php.general 
Request: Send a blank email to php-general+get-325553@lists.php.net to get a copy of this message
I am getting the warning below from this code: // self::$_zipper is initialized in class constructor method. if(self::$_zipper->extractTo($_dest) === false) { self::$_zipper->close(); $_out['error'] = $_errHead." error: ".$_zip['name']." not extracted: " return $_out; } Warning ZipArchive::extractTo() 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: JK

« previous php.general (#325553) next »