Skip to content
This repository has been archived by the owner on Feb 25, 2020. It is now read-only.

Zipper does not create real directories? #70

Open
gdebrion opened this issue Apr 14, 2016 · 1 comment
Open

Zipper does not create real directories? #70

gdebrion opened this issue Apr 14, 2016 · 1 comment

Comments

@gdebrion
Copy link

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.

@raheelkhan
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants