diff options
author | Robin Appelman <robin@icewind.nl> | 2021-10-19 14:58:40 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2021-10-19 14:58:40 +0200 |
commit | eb6e6e3a85a5d65215736998c916c5fe30d8271b (patch) | |
tree | 17fdefd3fc1a5b72830232546435d5dc12756bf9 /apps/files_external/lib | |
parent | 247e12da966aeceb833e8c60b833e089bee89f8a (diff) | |
download | nextcloud-server-eb6e6e3a85a5d65215736998c916c5fe30d8271b.tar.gz nextcloud-server-eb6e6e3a85a5d65215736998c916c5fe30d8271b.zip |
minor directory detect improvements
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/files_external/lib')
-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)) { |