summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2018-02-02 15:18:28 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2018-02-08 09:34:05 +0100
commit48ea714341d0025d793abd324251c134e74e230c (patch)
tree2cf369ec9e0cbfb63f531df6c01131565aabcfc1
parentb9393830495d4207d49169b7f2b2cee416f0f80c (diff)
downloadnextcloud-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.php11
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() {