diff options
author | Robin Appelman <robin@icewind.nl> | 2018-02-02 15:18:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-08 09:34:05 +0100 |
commit | 48ea714341d0025d793abd324251c134e74e230c (patch) | |
tree | 2cf369ec9e0cbfb63f531df6c01131565aabcfc1 | |
parent | b9393830495d4207d49169b7f2b2cee416f0f80c (diff) | |
download | nextcloud-server-48ea714341d0025d793abd324251c134e74e230c.tar.gz nextcloud-server-48ea714341d0025d793abd324251c134e74e230c.zip |
Use a more widely available method to test s3 settings
Signed-off-by: Robin Appelman <robin@icewind.nl>
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 11 |
1 files 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 03a24e89765..09858259aca 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() { |