Use a more widely available method to test s3 settings

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2018-02-02 15:18:28 +01:00 committed by Roeland Jago Douma
parent 655e39ffcd
commit 3036fb95ae
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 7 deletions

View File

@ -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() {