summaryrefslogtreecommitdiffstats
path: root/lib/private/files/cache/watcher.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/files/cache/watcher.php')
-rw-r--r--lib/private/files/cache/watcher.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/lib/private/files/cache/watcher.php b/lib/private/files/cache/watcher.php
index 5a4f53fb73d..f4572895b09 100644
--- a/lib/private/files/cache/watcher.php
+++ b/lib/private/files/cache/watcher.php
@@ -55,11 +55,14 @@ class Watcher {
* check $path for updates
*
* @param string $path
- * @return boolean|array true if path was updated, otherwise the cached data is returned
+ * @param array $cachedEntry
+ * @return boolean true if path was updated
*/
- public function checkUpdate($path) {
+ public function checkUpdate($path, $cachedEntry = null) {
if ($this->watchPolicy === self::CHECK_ALWAYS or ($this->watchPolicy === self::CHECK_ONCE and array_search($path, $this->checkedPaths) === false)) {
- $cachedEntry = $this->cache->get($path);
+ if (is_null($cachedEntry)) {
+ $cachedEntry = $this->cache->get($path);
+ }
$this->checkedPaths[] = $path;
if ($this->storage->hasUpdated($path, $cachedEntry['storage_mtime'])) {
if ($this->storage->is_dir($path)) {
@@ -73,7 +76,7 @@ class Watcher {
$this->cache->correctFolderSize($path);
return true;
}
- return $cachedEntry;
+ return false;
} else {
return false;
}