diff options
author | Vincent Petry <pvince81@owncloud.com> | 2013-12-02 18:32:32 +0100 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2013-12-03 12:26:08 +0100 |
commit | 3b7905364f406969410d505a8804034051451376 (patch) | |
tree | 5fe9cbb3dc5133618be8a96b0a4968c2205ab95e | |
parent | 76b1fcbf27351dee02f45bbf7b6409651ea80b14 (diff) | |
download | nextcloud-server-3b7905364f406969410d505a8804034051451376.tar.gz nextcloud-server-3b7905364f406969410d505a8804034051451376.zip |
Fixed test function for S3
Fixes #5752
-rw-r--r-- | apps/files_external/lib/amazons3.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/apps/files_external/lib/amazons3.php b/apps/files_external/lib/amazons3.php index b6d02ee0c46..00baacd488c 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; |