summaryrefslogtreecommitdiffstats
path: root/apps/files_external
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-06-16 09:48:10 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-06-16 09:48:10 +0200
commitb052eccd9a17089b7aaf4e67286fe254ef507206 (patch)
tree058d880051a16b6fc843130bbc27b3afd2b32241 /apps/files_external
parent0a5d73b8747fdffa23f364db90fd25955ae14b46 (diff)
parentd3f828af45817c1f2408bed003a83d79fd801a87 (diff)
downloadnextcloud-server-b052eccd9a17089b7aaf4e67286fe254ef507206.tar.gz
nextcloud-server-b052eccd9a17089b7aaf4e67286fe254ef507206.zip
Merge pull request #16938 from owncloud/ext-s3-opendirduplicate
Skip directory entry in S3 opendir
Diffstat (limited to 'apps/files_external')
-rw-r--r--apps/files_external/lib/amazons3.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php
index acf976e8fe4..763cf59aa4c 100644
--- a/apps/files_external/lib/amazons3.php
+++ b/apps/files_external/lib/amazons3.php
@@ -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']
);