mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
Merge pull request #16938 from owncloud/ext-s3-opendirduplicate
Skip directory entry in S3 opendir
This commit is contained in:
commit
b052eccd9a
1 changed files with 4 additions and 0 deletions
|
|
@ -274,6 +274,10 @@ class AmazonS3 extends \OC\Files\Storage\Common {
|
|||
), array('return_prefixes' => true));
|
||||
|
||||
foreach ($result as $object) {
|
||||
if (isset($object['Key']) && $object['Key'] === $path) {
|
||||
// it's the directory itself, skip
|
||||
continue;
|
||||
}
|
||||
$file = basename(
|
||||
isset($object['Key']) ? $object['Key'] : $object['Prefix']
|
||||
);
|
||||
|
|
|
|||
Loading…
Reference in a new issue