diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-03-06 13:38:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-03-06 13:38:23 +0100 |
commit | ed8e4cc78544df8fd4564115946959c0163a3118 (patch) | |
tree | 9cfa12e2d268cb7d12a11e322a3c3d6fefba45e0 | |
parent | 16fa18ab49a10ac3f562a25d6b5e86c5d8f4e2b2 (diff) | |
parent | 3036fb95ae94d94129d4628c4ed4907f2de9cc1a (diff) | |
download | nextcloud-server-ed8e4cc78544df8fd4564115946959c0163a3118.tar.gz nextcloud-server-ed8e4cc78544df8fd4564115946959c0163a3118.zip |
Merge pull request #8667 from nextcloud/8158_13
[stable13] Use a more widely available method to test s3 settings
-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 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() { |