Welcome Guest, Not a member yet? Register   Sign In
Zip for Mac bug
#1

[eluser]Unknown[/eluser]
I believe I have found a bug in the Zip Library. Could someone confirm please.

My task is to zip all contents of a folder on the server and provide that back to the user.

This is what I am doing:

Code:
$this->load->library('zip');
$this->get_files_from_folder('assets/codes/myfolder/', 'Code-');
$this->zip->download($campaign->name.'.zip');

(have tried with full server path to folder also)

This all works perfectly when downloading and unzipping in Windows XP.
When trying to unzip the same file on a MAC I get the following error:

Quote:Unable to unarchive "zipfile.zip" into Downloads
(Error 1 - Operation not permitted)

I know the zip file is fine because I can unzip successfully through the terminal.
I'm not running terminal as root so I don't think this is a MAC user permissions issue.

Any confirmation or correction would be most welcome.
#2

[eluser]cotejf[/eluser]
Hi Glyn,
im currently using Zip too (zipping all the files from a folder) and Im running it on MAMP Pro server.

That way it works fine:

$this->load->library('zip');
$this->zip->read_dir('./res/blablabla/');
$this->zip->download('azipfile.zip');


The zip file is perfect. My only problem is that I cant call any redirect right after the $this->zip->download('azipfile.zip');

HTH




Theme © iAndrew 2016 - Forum software by © MyBB