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

Commit

Permalink
Merge pull request #36 from plantwebdesign/master
Browse files Browse the repository at this point in the history
Fix for addition of folders on Windows
  • Loading branch information
Nils Plaschke committed Feb 16, 2015
2 parents 05a60cb + ddfd081 commit 313e364
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Chumper/Zipper/Zipper.php
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ private function addDir($pathToDir)
// Now let's visit the subdirectories and add them, too.
foreach ($this->file->directories($pathToDir) as $dir) {
$old_folder = $this->currentFolder;
$this->currentFolder = $this->currentFolder . '/' . basename($dir);
$this->currentFolder = empty($this->currentFolder) ? basename($dir) : $this->currentFolder . '/' . basename($dir);
$this->addDir($pathToDir . '/' . basename($dir));
$this->currentFolder = $old_folder;
}
Expand Down

0 comments on commit 313e364

Please sign in to comment.