Signed-off-by: Robin Appelman <robin@icewind.nl>
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
+ ]
+ );
+ }
}
}