Skip to content

Commit 774b85a

Browse files
authored
Merge pull request #51984 from nextcloud/backport/51942/stable31
[stable31] fix(cache): always require updates if mtime is null
2 parents 4ec0ca6 + 45cd762 commit 774b85a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/private/Files/Cache/Watcher.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ public function update($path, $cachedData) {
118118
public function needsUpdate($path, $cachedData) {
119119
if ($this->watchPolicy === self::CHECK_ALWAYS or ($this->watchPolicy === self::CHECK_ONCE and !in_array($path, $this->checkedPaths))) {
120120
$this->checkedPaths[] = $path;
121-
return $this->storage->hasUpdated($path, $cachedData['storage_mtime']);
121+
return $cachedData['storage_mtime'] === null || $this->storage->hasUpdated($path, $cachedData['storage_mtime']);
122122
}
123123
return false;
124124
}

0 commit comments

Comments
 (0)