diff --git a/lib/Sabre/Album/PropFindPlugin.php b/lib/Sabre/Album/PropFindPlugin.php index 034d19ba1..0b6480645 100644 --- a/lib/Sabre/Album/PropFindPlugin.php +++ b/lib/Sabre/Album/PropFindPlugin.php @@ -36,6 +36,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'; @@ -154,6 +155,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; });