diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-06-15 17:23:17 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-06-15 17:30:09 +0200 |
commit | d3f828af45817c1f2408bed003a83d79fd801a87 (patch) | |
tree | baba6ace60096936403ffa464b081e3531dfd055 /apps | |
parent | b6165b68655fdf957d9b63ab982a5f8724fcc3de (diff) | |
download | nextcloud-server-d3f828af45817c1f2408bed003a83d79fd801a87.tar.gz nextcloud-server-d3f828af45817c1f2408bed003a83d79fd801a87.zip |
Skip directory entry in S3 opendir
The result set contains the directory itself, so skip it to avoid
scanning a non-existing directory
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/amazons3.php | 4 |
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'] ); |