mirror of
https://github.com/filegator/filegator.git
synced 2025-08-12 13:04:13 +02:00
zip adapter fix
This commit is contained in:
@@ -94,11 +94,12 @@ class ZipArchiver implements Service, ArchiverInterface
|
|||||||
$contents = $archive->listContents('/', true);
|
$contents = $archive->listContents('/', true);
|
||||||
|
|
||||||
foreach ($contents as $item) {
|
foreach ($contents as $item) {
|
||||||
$stream = $archive->readStream($item['path']);
|
$stream = null;
|
||||||
if ($item['type'] == 'dir') {
|
if ($item['type'] == 'dir') {
|
||||||
$storage->createDir($destination, $item['path']);
|
$storage->createDir($destination, $item['path']);
|
||||||
}
|
}
|
||||||
if ($item['type'] == 'file') {
|
if ($item['type'] == 'file') {
|
||||||
|
$stream = $archive->readStream($item['path']);
|
||||||
$storage->store($destination.'/'.$item['dirname'], $item['basename'], $stream);
|
$storage->store($destination.'/'.$item['dirname'], $item['basename'], $stream);
|
||||||
}
|
}
|
||||||
if (is_resource($stream)) {
|
if (is_resource($stream)) {
|
||||||
|
Reference in New Issue
Block a user