diff options
author | Robin Appelman <robin@icewind.nl> | 2024-10-03 17:35:56 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2024-11-07 16:27:14 +0100 |
commit | 19ec79b3134bb2b78d900c05d62a913500eec282 (patch) | |
tree | 8078a1cf478479b0a66ea93fc334e7de9b2b655e /apps/dav/lib | |
parent | 31f4f67c0c5ceace8f4c75daa29a0b51ddd3264a (diff) | |
download | nextcloud-server-19ec79b3134bb2b78d900c05d62a913500eec282.tar.gz nextcloud-server-19ec79b3134bb2b78d900c05d62a913500eec282.zip |
fix: smuggle storage id to metadata insert queries
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'apps/dav/lib')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/FilesPlugin.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/apps/dav/lib/Connector/Sabre/FilesPlugin.php b/apps/dav/lib/Connector/Sabre/FilesPlugin.php index 3855f51c65a..dbd4e522517 100644 --- a/apps/dav/lib/Connector/Sabre/FilesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/FilesPlugin.php @@ -8,6 +8,7 @@ namespace OCA\DAV\Connector\Sabre; use OC\AppFramework\Http\Request; +use OC\FilesMetadata\Model\FilesMetadata; use OCA\DAV\Connector\Sabre\Exception\InvalidPath; use OCP\Constants; use OCP\Files\ForbiddenException; @@ -575,7 +576,9 @@ class FilesPlugin extends ServerPlugin { $propPatch->handle( $mutation, function (mixed $value) use ($accessRight, $knownMetadata, $node, $mutation, $filesMetadataManager): bool { + /** @var FilesMetadata $metadata */ $metadata = $filesMetadataManager->getMetadata((int)$node->getFileId(), true); + $metadata->setStorageId($node->getNode()->getStorage()->getCache()->getNumericStorageId()); $metadataKey = substr($mutation, strlen(self::FILE_METADATA_PREFIX)); // confirm metadata key is editable via PROPPATCH |