PEAR is archived and read-only

This mirror preserves historical PEAR package releases and metadata so existing references remain available.

Home » File Formats » Archive_Zip » Bug #6156

ZIP archives fail to expand on OSX

Details

Submitted2005-12-05 14:27 UTC
Fromdick at tienhuis dot nl
StatusSuspended
PackageArchive_Zip
PHP Version5.1.0
OSOSX
Roadmaps(Not assigned)

Comments

[2005-12-05 14:27 UTC] dick at tienhuis dot nl

Description:
------------
On a Debian server with PHP-5.1.0 I use the latest version of Archive_Zip to create ZIP files to pack directories.
While the archives extract OK on Windows and Linux (well, apart from the previous <a href="http://pear.php.net/bugs/bug.php?id=5946">UTF-8 bug</a>), they do not work on Mac OSX.
With Apple's native unzip utility I get an error:

'Unable to unarchive "Robbie.zip" into "Documents". (Error -20 - Not a directory.)'

Using 3rd party decompressor Stuffit Expander I get:

'An error has occured while expanding the file "Robbie.zip" (Unspecified Stuffit Engine internal error). Error #17999'

Test script:
---------------
include_once 'Archive/Zip.php';
$options = array("remove_path" => '/opt/data/mp3');
$zip = &new Archive_Zip('/opt/tmp/zips/Robbie.zip');
$zip->create('/opt/data/mp3/Robbie Willams - Intensive Care',$options);

Expected result:
----------------
File expands to directory again

Actual result:
--------------
Error on OSX. No error on Win32/Lnx.

[2006-11-13 18:28 UTC] stephen at capellic dot com

I am getting the same error on OS X (10.4.8). However, I only get the error when the $p_filelist parameter is a directory of files. The parameter I am giving it looks something like this:

Array(
[0] => /path/to/dir
);

The directory hase four files in it.

It works just fine if the contents of the parameter are file names and not directory names:

Array(
[0] => /path/to/dir/file_1.txt
[1] => /path/to/dir/file_2.txt
[2] => /path/to/dir/file_3.txt
[3] => /path/to/dir/file_4.txt
);