Merge pull request #51942 from nextcloud/fix/require-update-if-mtime-is-null

fix(cache): always require updates if mtime is null
pull/51944/head
Ferdinand Thiessen 2025-04-07 10:17:02 +07:00 committed by GitHub
commit 1ef94153b8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

@ -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;
}