Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[stable18] dont try to update storage mtime if we can't get the mtime #20774

Merged
merged 1 commit into from
May 11, 2020
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
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