diff options
author | Carl Schwan <carl@carlschwan.eu> | 2022-10-16 23:39:49 +0200 |
---|---|---|
committer | Carl Schwan <carl@carlschwan.eu> | 2022-10-16 23:39:49 +0200 |
commit | cf1381a6f995fb2196a37253dd46dbf6d34a920a (patch) | |
tree | 886e6f8b773a7f3a807631f33d45590df46a09e3 /apps/files_external/lib/Lib/Storage | |
parent | 1d90f84141c60ed07ae43d4e1098d14582ea1ea9 (diff) | |
download | nextcloud-server-cf1381a6f995fb2196a37253dd46dbf6d34a920a.tar.gz nextcloud-server-cf1381a6f995fb2196a37253dd46dbf6d34a920a.zip |
Port away from deprecated clearBucket call
This was removed a long time ago in the library that we use, but never
detected since this was inside a try catch block...
Remove the call for now and we should investigate newer api in the
future.
Signed-off-by: Carl Schwan <carl@carlschwan.eu>
Diffstat (limited to 'apps/files_external/lib/Lib/Storage')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index f5bb7eb5f06..1b3d2e6936f 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -293,18 +293,11 @@ class AmazonS3 extends \OC\Files\Storage\Common { protected function clearBucket() { $this->clearCache(); - try { - $this->getConnection()->clearBucket([ - "Bucket" => $this->bucket - ]); - return true; - // clearBucket() is not working with Ceph, so if it fails we try the slower approach - } catch (\Exception $e) { - return $this->batchDelete(); - } + return $this->batchDelete(); } private function batchDelete($path = null) { + // TODO explore using https://docs.aws.amazon.com/aws-sdk-php/v3/api/class-Aws.S3.BatchDelete.html $params = [ 'Bucket' => $this->bucket ]; |