summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-10-19 14:58:40 +0200
committerRobin Appelman <robin@icewind.nl>2021-10-26 14:45:20 +0200
commit759f2daf3854521e053411e3c80b4430f1627bfc (patch)
treedb252ce7f6981c91be081427afecb45923abe226 /apps
parent99ba96524e2e0caf7316375bb215a85af9480c2d (diff)
downloadnextcloud-server-759f2daf3854521e053411e3c80b4430f1627bfc.tar.gz
nextcloud-server-759f2daf3854521e053411e3c80b4430f1627bfc.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.php4
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 ee9d35847f1..64da89c12f2 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)) {