From 3036fb95ae94d94129d4628c4ed4907f2de9cc1a Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 2 Feb 2018 15:18:28 +0100 Subject: Use a more widely available method to test s3 settings Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/AmazonS3.php | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index c8465997f65..cc9cdc08138 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -572,13 +572,10 @@ class AmazonS3 extends \OC\Files\Storage\Common { } public function test() { - $test = $this->getConnection()->getBucketAcl(array( - 'Bucket' => $this->bucket, - )); - if (isset($test) && !is_null($test->getPath('Owner/ID'))) { - return true; - } - return false; + $this->getConnection()->headBucket([ + 'Bucket' => $this->bucket + ]); + return true; } public function getId() { -- cgit v1.2.3