Skip to content
Snippets Groups Projects
Unverified Commit 672b7ad1 authored by Roeland Jago Douma's avatar Roeland Jago Douma Committed by GitHub
Browse files

Merge pull request #19743 from nextcloud/cache-updater-storage-mtime-false

dont try to update storage mtime if we can't get the mtime
parents 48b374f6 f9729904
No related branches found
No related tags found
No related merge requests found
...@@ -224,12 +224,15 @@ class Updater implements IUpdater { ...@@ -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
]
);
}
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment