aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFerdinand Thiessen <opensource@fthiessen.de>2025-04-04 13:41:32 +0200
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-04-07 08:17:16 +0000
commit45cd76224edd2eabf2618336655469681312681c (patch)
tree61d679e46b7a8269d064d400c2426cbe55da9f73
parent177c0b2487bd241471d269b7a13d42cbe8356da0 (diff)
downloadnextcloud-server-backport/51942/stable31.tar.gz
nextcloud-server-backport/51942/stable31.zip
fix(cache): always require updates if mtime is nullbackport/51942/stable31
- Resolves https://github.com/nextcloud/server/issues/51941 Due to strong typings we introduced the parameter needs to be an integer. Previously it was `null` which was equal to `0`. So if there is no storage mtime we need to update the cache. Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
-rw-r--r--lib/private/Files/Cache/Watcher.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Cache/Watcher.php b/lib/private/Files/Cache/Watcher.php
index b6c69dd7330..f1de5d3cfb8 100644
--- a/lib/private/Files/Cache/Watcher.php
+++ b/lib/private/Files/Cache/Watcher.php
@@ -118,7 +118,7 @@ class Watcher implements IWatcher {
public function needsUpdate($path, $cachedData) {
if ($this->watchPolicy === self::CHECK_ALWAYS or ($this->watchPolicy === self::CHECK_ONCE and !in_array($path, $this->checkedPaths))) {
$this->checkedPaths[] = $path;
- return $this->storage->hasUpdated($path, $cachedData['storage_mtime']);
+ return $cachedData['storage_mtime'] === null || $this->storage->hasUpdated($path, $cachedData['storage_mtime']);
}
return false;
}