From 3b7905364f406969410d505a8804034051451376 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 2 Dec 2013 18:32:32 +0100 Subject: [PATCH] Fixed test function for S3 Fixes #5752 --- apps/files_external/lib/amazons3.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index b6d02ee0c4..00baacd488 100644 --- a/apps/files_external/lib/amazons3.php +++ b/apps/files_external/lib/amazons3.php @@ -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;