Skip to content
Merged
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
6 changes: 6 additions & 0 deletions apps/files_external/lib/Lib/Storage/AmazonS3.php
Original file line number Diff line number Diff line change
Expand Up @@ -608,6 +608,12 @@ public function getDirectoryContent(string $directory): \Traversable {
// sub folders
if (is_array($result['CommonPrefixes'])) {
foreach ($result['CommonPrefixes'] as $prefix) {
if (preg_match('/\/{2,}$/', $prefix['Prefix'])) {
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I trust that it works, but I don't get it.

  1. Where are those repeated / coming from? From the NC config or from Amazon?
  2. Do I understand it correctly that this is ignoring repeated / coming from Amazon response?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. It's coming from Amazon.
  2. Yes, that's right. It's ignoring it but anything after it is also ignored as a result.

$this->logger->warning('Detected a repeating delimiter in prefix \'' . $prefix['Prefix']
. '\'. This is unsupported and its contents have been ignored.');
continue;
}

$dir = $this->getDirectoryMetaData($prefix['Prefix']);
if ($dir) {
yield $dir;
Expand Down
Loading