Skip to content

Commit 419e0a5

Browse files
Merge pull request #53462 from nextcloud/objectstore-touch-double-cache
fix: remove double cache write in ObjectStoreStorage::touch
2 parents f05f79a + 2e1c316 commit 419e0a5

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

lib/private/Files/ObjectStore/ObjectStoreStorage.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -413,16 +413,6 @@ public function touch(string $path, ?int $mtime = null): bool {
413413
//create a empty file, need to have at least on char to make it
414414
// work with all object storage implementations
415415
$this->file_put_contents($path, ' ');
416-
$mimeType = \OC::$server->getMimeTypeDetector()->detectPath($path);
417-
$stat = [
418-
'etag' => $this->getETag($path),
419-
'mimetype' => $mimeType,
420-
'size' => 0,
421-
'mtime' => $mtime,
422-
'storage_mtime' => $mtime,
423-
'permissions' => \OCP\Constants::PERMISSION_ALL - \OCP\Constants::PERMISSION_CREATE,
424-
];
425-
$this->getCache()->put($path, $stat);
426416
} catch (\Exception $ex) {
427417
$this->logger->error(
428418
'Could not create object for ' . $path,

0 commit comments

Comments
 (0)