From 3d6d8d1bb683f9daca3a2b8a876e291adc320375 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 20 Jan 2014 15:21:21 +0100 Subject: Reuse the data retrieved from the cache in checkUpdate --- lib/private/files/view.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'lib/private/files/view.php') diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 8893911ed5d..d97544b865e 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -801,6 +801,7 @@ class View { * @var string $internalPath */ list($storage, $internalPath) = Filesystem::resolvePath($path); + $data = null; if ($storage) { $cache = $storage->getCache($internalPath); $permissionsCache = $storage->getPermissionsCache($internalPath); @@ -811,10 +812,12 @@ class View { $scanner->scan($internalPath, Cache\Scanner::SCAN_SHALLOW); } else { $watcher = $storage->getWatcher($internalPath); - $watcher->checkUpdate($internalPath); + $data = $watcher->checkUpdate($internalPath); } - $data = $cache->get($internalPath); + if (!is_array($data)) { + $data = $cache->get($internalPath); + } if ($data and $data['fileid']) { if ($includeMountPoints and $data['mimetype'] === 'httpd/unix-directory') { -- cgit v1.2.3