dont try to update storage mtime if we can't get the mtime
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
64a29d01a4
commit
f972990469
1 changed files with 9 additions and 6 deletions
|
@ -224,12 +224,15 @@ class Updater implements IUpdater {
|
|||
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
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue