Skip to content

Commit

Permalink
zip adapter fix
Browse files Browse the repository at this point in the history
  • Loading branch information
alcalbg committed May 11, 2020
1 parent e2d08d9 commit 0ceaaea
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/Services/Archiver/Adapters/ZipArchiver.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,12 @@ public function uncompress(string $source, string $destination, Storage $storage
$contents = $archive->listContents('/', true);

foreach ($contents as $item) {
$stream = $archive->readStream($item['path']);
$stream = null;
if ($item['type'] == 'dir') {
$storage->createDir($destination, $item['path']);
}
if ($item['type'] == 'file') {
$stream = $archive->readStream($item['path']);
$storage->store($destination.'/'.$item['dirname'], $item['basename'], $stream);
}
if (is_resource($stream)) {
Expand Down

0 comments on commit 0ceaaea

Please sign in to comment.