diff --git a/apps/dav/lib/DAV/CustomPropertiesBackend.php b/apps/dav/lib/DAV/CustomPropertiesBackend.php index 9485e4fe7f4d9..7b26808397617 100644 --- a/apps/dav/lib/DAV/CustomPropertiesBackend.php +++ b/apps/dav/lib/DAV/CustomPropertiesBackend.php @@ -373,7 +373,10 @@ private function cacheDirectory(string $path, Directory $node): void { )), ) ->where($query->expr()->eq('parent', $query->createNamedParameter($node->getInternalFileId(), IQueryBuilder::PARAM_INT))) - ->andWhere($query->expr()->eq('p.userid', $query->createNamedParameter($this->user->getUID()))); + ->andWhere($query->expr()->orX( + $query->expr()->eq('p.userid', $query->createNamedParameter($this->user->getUID())), + $query->expr()->isNull('p.userid'), + )); $result = $query->executeQuery(); $propsByPath = [];