Grandt/PHPZip — Issue #4: OSX Archive Utility: Error 1 - Operation not permitted
Author: martyf
Created: 2012-03-02 03:37:00+00:00
State: open

Using 1.30 of Zip.php, created files are unable to be opened by OSX's Archive Utility.

Error message is displayed:
Error 1 - Operation not permitted.

```php
$zipper = new Zip(true);
$zipper->setZipFile($outputDir . '/' . $zipName);

if ($handle = opendir($path)) {
while (false !== ($file = readdir($handle))) {
if (is_file($path.$file)) {
$zipper->addLargeFile($path.$file, $file);
}
}
}

$zipper->finalize();
```

Example is very simple, just looking through a directory, and adding all files in that directory to the zip file.

Other tools, such as Archive and even "unzip" via terminal, can open the zip file with no dramas - it's just the Archive Utility built into OSX that has dramas.

Console reports:
2/03/12 2:32:31.361 PM Archive Utility: bomCopierFatalError:Couldn't read pkzip signature.