diff options
author | Robin Appelman <robin@icewind.nl> | 2018-02-02 15:18:28 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-03-05 19:41:56 +0100 |
commit | 3036fb95ae94d94129d4628c4ed4907f2de9cc1a (patch) | |
tree | 06bf0a300c1012bcc14af861286446d28e6385ad /apps | |
parent | 655e39ffcd41b1341f436272a80786f21f69c5b6 (diff) | |
download | nextcloud-server-3036fb95ae94d94129d4628c4ed4907f2de9cc1a.tar.gz nextcloud-server-3036fb95ae94d94129d4628c4ed4907f2de9cc1a.zip |
Use a more widely available method to test s3 settings
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-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() { |