Merge pull request #53462 from nextcloud/objectstore-touch-double-cache

fix: remove double cache write in ObjectStoreStorage::touch
This commit is contained in:
Andy Scherzinger 2025-06-18 22:53:54 +02:00 committed by GitHub
commit 419e0a5527
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -413,16 +413,6 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
//create a empty file, need to have at least on char to make it
// work with all object storage implementations
$this->file_put_contents($path, ' ');
$mimeType = \OC::$server->getMimeTypeDetector()->detectPath($path);
$stat = [
'etag' => $this->getETag($path),
'mimetype' => $mimeType,
'size' => 0,
'mtime' => $mtime,
'storage_mtime' => $mtime,
'permissions' => \OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE,
];
$this->getCache()->put($path, $stat);
} catch (\Exception $ex) {
$this->logger->error(
'Could not create object for ' . $path,