From 54c05bcdb96fcbab8a8c552e6558dc18b1571af3 Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Tue, 19 Jul 2022 16:20:44 +0200 Subject: handle AccessDenied error when checking if external s3 support versions Signed-off-by: Matthieu Gallien --- apps/files_external/lib/Lib/Storage/AmazonS3.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'apps/files_external/lib/Lib/Storage') diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 6ebbed33a87..d5b8eff6fe5 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -744,7 +744,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { return $result->get('Status') === 'Enabled'; } catch (S3Exception $s3Exception) { // This is needed for compatibility with Storj gateway which does not support versioning yet - if ($s3Exception->getAwsErrorCode() === 'NotImplemented') { + if ($s3Exception->getAwsErrorCode() === 'NotImplemented' || $s3Exception->getAwsErrorCode() === 'AccessDenied') { return false; } throw $s3Exception; -- cgit v1.2.3