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 b939383049
commit 48ea714341
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 4 additions and 7 deletions

View File

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