Fixed test function for S3

Fixes #5752
This commit is contained in:
Vincent Petry 2013-12-02 18:32:32 +01:00
parent 76b1fcbf27
commit 3b7905364f
1 changed files with 4 additions and 2 deletions

View File

@ -507,8 +507,10 @@ class AmazonS3 extends \OC\Files\Storage\Common {
}
public function test() {
$test = $this->s3->get_canonical_user_id();
if (isset($test['id']) && $test['id'] != '') {
$test = $this->connection->getBucketAcl(array(
'Bucket' => $this->bucket,
));
if (isset($test) && !is_null($test->getPath('Owner/ID'))) {
return true;
}
return false;