summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoeland Jago Douma <rullzer@users.noreply.github.com>2018-02-19 17:09:36 +0100
committerGitHub <noreply@github.com>2018-02-19 17:09:36 +0100
commit7ad1e13961eb48d3cf61c77faddfc6507f77e6ee (patch)
tree1f1619509e4ef751cab242ef47ab9c79baad205d
parent4e6d98ea8c9219c5c04209572e7b6dd7d7f1dd8e (diff)
parent48ea714341d0025d793abd324251c134e74e230c (diff)
downloadnextcloud-server-7ad1e13961eb48d3cf61c77faddfc6507f77e6ee.tar.gz
nextcloud-server-7ad1e13961eb48d3cf61c77faddfc6507f77e6ee.zip
Merge pull request #8158 from nextcloud/s3-minio
Use a more widely available method to test s3 settings
-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 f06247c3690..459f9b80e12 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -571,13 +571,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() {