From 48ea714341d0025d793abd324251c134e74e230c Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 2 Feb 2018 15:18:28 +0100 Subject: [PATCH] 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 03a24e8976..09858259ac 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -566,13 +566,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() {