zip adapter fix

This commit is contained in:
Milos Stojanovic
2020-05-11 16:09:08 +00:00
parent e2d08d908e
commit 0ceaaea75a

View File

@@ -94,11 +94,12 @@ class ZipArchiver implements Service, ArchiverInterface
$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)) {