Merge pull request #19743 from nextcloud/cache-updater-storage-mtime-false
dont try to update storage mtime if we can't get the mtime
This commit is contained in:
commit
672b7ad1bc
1 changed files with 9 additions and 6 deletions
|
@ -224,12 +224,15 @@ class Updater implements IUpdater {
|
||||||
private function updateStorageMTimeOnly($internalPath) {
|
private function updateStorageMTimeOnly($internalPath) {
|
||||||
$fileId = $this->cache->getId($internalPath);
|
$fileId = $this->cache->getId($internalPath);
|
||||||
if ($fileId !== -1) {
|
if ($fileId !== -1) {
|
||||||
$this->cache->update(
|
$mtime = $this->storage->filemtime($internalPath);
|
||||||
$fileId, [
|
if ($mtime !== false) {
|
||||||
'mtime' => null, // this magic tells it to not overwrite mtime
|
$this->cache->update(
|
||||||
'storage_mtime' => $this->storage->filemtime($internalPath)
|
$fileId, [
|
||||||
]
|
'mtime' => null, // this magic tells it to not overwrite mtime
|
||||||
);
|
'storage_mtime' => $mtime
|
||||||
|
]
|
||||||
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue