Zipper icon indicating copy to clipboard operation
Zipper copied to clipboard

Zipper does not create real directories?

Open gdebrion opened this issue 9 years ago • 1 comments

Hello,

I have noticed that directories are not created on my archive. The files does contain the path in their name, so in the most cases operating software can manage this, but not always.

For instance, my almost correct ZIP created with Zipper: capture-0013

And a correct ZIP file: capture-0014

Please notice that in the first case, there is no single line like js or fonts whereas there are present in the second case.

Here is my code:

$zipper = new \Chumper\Zipper\Zipper;
$zipper->make(public_path().'/medias/'.$equipment->outlet->company_id.'/'.$name)
    ->addString('index.html', $output);

if(is_dir(app_path().'/views/templates/'.$theme.'_assets')) {
    $zipper->add(app_path().'/views/templates/'.$theme.'_assets');
}

$zipper->close();

Am I doing something wrong? I have tried to use folder() and a loop, but with no results.

gdebrion avatar Apr 14 '16 08:04 gdebrion

I am also facing the same issue. It makes all the files in sub-folders to root level

raheelkhan avatar Apr 27 '16 15:04 raheelkhan