Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions apps/files_external/lib/Lib/Storage/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -294,11 +294,18 @@ private function batchDelete(?string $path = null): bool {

public function opendir(string $path) {
try {
$content = iterator_to_array($this->getDirectoryContent($path));
return IteratorDirectory::wrap(array_map(function (array $item) {
return $item['name'];
}, $content));
$names = [];
foreach ($this->getDirectoryContent($path) as $item) {
if (isset($item['name'])) {
$names[] = $item['name'];
}
}
return IteratorDirectory::wrap($names);
} catch (S3Exception $e) {
$this->logger->error($e->getMessage(), [
'app' => 'files_external',
'exception' => $e,
]);
return false;
}
}
Expand Down
Loading