From 01cd477f0459b987fcb6dc35a883d90d59afac4e Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Fri, 15 Oct 2021 14:54:09 +0200 Subject: [PATCH] optimize filetype for s3 directories a bit Signed-off-by: Robin Appelman --- apps/files_external/lib/Lib/Storage/AmazonS3.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php index 6fbe913ec7c..c4c82c6a879 100644 --- a/apps/files_external/lib/Lib/Storage/AmazonS3.php +++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php @@ -451,6 +451,9 @@ class AmazonS3 extends \OC\Files\Storage\Common { } try { + if (isset($this->directoryCache[$path])) { + return 'dir'; + } if (isset($this->filesCache[$path]) || $this->headObject($path)) { return 'file'; }