Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kesselberg <mail@danielkesselberg.de>2019-01-01 20:15:07 +0300
committerDaniel Kesselberg <mail@danielkesselberg.de>2019-09-23 15:03:41 +0300
commit80340a8d463e2d115ed1c33c0f0f54542f3e952e (patch)
treebc0b202ffaac895e7d4826cd576ea9e412f25253 /apps/files_external/lib
parent12863e0d243bb72057f1a005a0b319910f4da8c5 (diff)
Fill directory cache from opendir
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
Diffstat (limited to 'apps/files_external/lib')
-rw-r--r--apps/files_external/lib/Lib/Storage/AmazonS3.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_external/lib/Lib/Storage/AmazonS3.php b/apps/files_external/lib/Lib/Storage/AmazonS3.php
index b48c3fbfd83..019bfa17b3c 100644
--- a/apps/files_external/lib/Lib/Storage/AmazonS3.php
+++ b/apps/files_external/lib/Lib/Storage/AmazonS3.php
@@ -60,6 +60,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
/** @var CappedMemoryCache|Result[] */
private $objectCache;
+
/** @var CappedMemoryCache|bool[] */
private $directoryCache;
@@ -114,7 +115,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
unset($this->objectCache[$existingKey]);
}
}
- unset($this->filesCache[$key]);
+ unset($this->directoryCache[$key], $this->filesCache[$key]);
}
/**
@@ -334,6 +335,7 @@ class AmazonS3 extends \OC\Files\Storage\Common {
if (is_array($result['CommonPrefixes'])) {
foreach ($result['CommonPrefixes'] as $prefix) {
$files[] = substr(trim($prefix['Prefix'], '/'), strlen($path));
+ $this->directoryCache[substr(trim($prefix['Prefix'], '/'), strlen($path))] = true;
}
}
if (is_array($result['Contents'])) {