From 68128065d6b775a11a8e857c0a5125750249a5ec Mon Sep 17 00:00:00 2001 From: Louis Chemineau Date: Mon, 8 Jul 2024 13:58:15 +0200 Subject: [PATCH] feat: Handle complex location type Signed-off-by: Louis Chemineau --- lib/Sabre/PropFindPlugin.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/Sabre/PropFindPlugin.php b/lib/Sabre/PropFindPlugin.php index 35c8e581e..adbf0a46e 100644 --- a/lib/Sabre/PropFindPlugin.php +++ b/lib/Sabre/PropFindPlugin.php @@ -40,6 +40,7 @@ use Sabre\DAV\Server; use Sabre\DAV\ServerPlugin; use Sabre\DAV\Tree; +use Sabre\DAV\Xml\Property\Complex; class PropFindPlugin extends ServerPlugin { public const ORIGINAL_NAME_PROPERTYNAME = '{http://nextcloud.org/ns}original-name'; @@ -145,6 +146,10 @@ public function handleUpdateProperties($path, PropPatch $propPatch): void { $node = $this->tree->getNodeForPath($path); if ($node instanceof AlbumRoot) { $propPatch->handle(self::LOCATION_PROPERTYNAME, function ($location) use ($node) { + if ($location instanceof Complex) { + $location = $location->getXml(); + } + $this->albumMapper->setLocation($node->getAlbum()->getAlbum()->getId(), $location); return true; });