Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix(cache): always require updates if mtime is null
- Resolves #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 <[email protected]>
  • Loading branch information
susnux committed Apr 4, 2025
commit 3a09acebd23c0f59eeb3b08c358d6992029f609c
2 changes: 1 addition & 1 deletion lib/private/Files/Cache/Watcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public function update($path, $cachedData) {
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;
}
Expand Down
Loading