diff options
Diffstat (limited to 'apps/files_external/lib/Lib/Storage/AmazonS3.php')
-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 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)) { |