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
dont try to update storage mtime if we can't get the mtime
Signed-off-by: Robin Appelman <[email protected]>
  • Loading branch information
icewind1991 authored and backportbot[bot] committed May 1, 2020
commit 3998f94ec0c18d79fc86e5ddc4aee7b244b222c0
15 changes: 9 additions & 6 deletions lib/private/Files/Cache/Updater.php
Original file line number Diff line number Diff line change
Expand Up @@ -224,12 +224,15 @@ public function renameFromStorage(IStorage $sourceStorage, $source, $target) {
private function updateStorageMTimeOnly($internalPath) {
$fileId = $this->cache->getId($internalPath);
if ($fileId !== -1) {
$this->cache->update(
$fileId, [
'mtime' => null, // this magic tells it to not overwrite mtime
'storage_mtime' => $this->storage->filemtime($internalPath)
]
);
$mtime = $this->storage->filemtime($internalPath);
if ($mtime !== false) {
$this->cache->update(
$fileId, [
'mtime' => null, // this magic tells it to not overwrite mtime
'storage_mtime' => $mtime
]
);
}
}
}

Expand Down