zipArchive class extractTo failing

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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


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




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux