From 3674f6fa2d8e4d6dfbabaca6edb8f451f06f5736 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Mon, 22 Jul 2019 16:41:15 +0200 Subject: Check the if we can actually access the storage cache for recent files MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Files/Node/Folder.php | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/private') diff --git a/lib/private/Files/Node/Folder.php b/lib/private/Files/Node/Folder.php index b0569a24aa1..7f908a757a0 100644 --- a/lib/private/Files/Node/Folder.php +++ b/lib/private/Files/Node/Folder.php @@ -442,6 +442,10 @@ class Folder extends Node implements \OCP\Files\Folder { }, $result)); return array_values(array_filter($files, function (Node $node) { + $cacheEntry = $node->getMountPoint()->getStorage()->getCache()->get($node->getId()); + if (!$cacheEntry) { + return false; + } $relative = $this->getRelativePath($node->getPath()); return $relative !== null && $relative !== '/'; })); -- cgit v1.2.3