diff options
author | Robin Appelman <robin@icewind.nl> | 2021-10-19 14:58:40 +0200 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2021-10-22 12:34:31 +0000 |
commit | da4712b62c3625f43110d4ffbb8524a7b2b318ab (patch) | |
tree | 2a5f08c9ecc3c1e8e3f862825641537e9f3359e7 /apps | |
parent | d85c0f0c73f03ce054624f5ad0822e9a354ad8b1 (diff) | |
download | nextcloud-server-da4712b62c3625f43110d4ffbb8524a7b2b318ab.tar.gz nextcloud-server-da4712b62c3625f43110d4ffbb8524a7b2b318ab.zip |
minor directory detect improvements
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files_external/lib/Lib/Storage/AmazonS3.php | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index aa0afac1543..cb5fe134e6f 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -204,7 +204,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { return true; } } catch (S3Exception $e) { - if ($e->getStatusCode() === 403) { + if ($e->getStatusCode() >= 400 && $e->getStatusCode() < 500) { $this->directoryCache[$path] = false; } throw $e; @@ -422,7 +422,7 @@ class AmazonS3 extends \OC\Files\Storage\Common { } try { - if (isset($this->directoryCache[$path])) { + if (isset($this->directoryCache[$path]) && $this->directoryCache[$path]) { return 'dir'; } if (isset($this->filesCache[$path]) || $this->headObject($path)) { |