Skip to content

Commit 4cbf64b

Browse files
authored
Merge pull request #42357 from nextcloud/backport/42350/stable28
[stable28] Don't query oc_properties for metadata props
2 parents 36f9106 + 112063b commit 4cbf64b

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

apps/dav/lib/DAV/CustomPropertiesBackend.php

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828
use Exception;
2929
use OCA\DAV\Connector\Sabre\Directory;
30+
use OCA\DAV\Connector\Sabre\FilesPlugin;
3031
use OCP\DB\QueryBuilder\IQueryBuilder;
3132
use OCP\IDBConnection;
3233
use OCP\IUser;
@@ -136,7 +137,7 @@ class CustomPropertiesBackend implements BackendInterface {
136137
public function __construct(
137138
Tree $tree,
138139
IDBConnection $connection,
139-
IUser $user
140+
IUser $user,
140141
) {
141142
$this->tree = $tree;
142143
$this->connection = $connection;
@@ -156,7 +157,11 @@ public function propFind($path, PropFind $propFind) {
156157
// these might appear
157158
$requestedProps = array_diff(
158159
$requestedProps,
159-
self::IGNORED_PROPERTIES
160+
self::IGNORED_PROPERTIES,
161+
);
162+
$requestedProps = array_filter(
163+
$requestedProps,
164+
fn ($prop) => !str_starts_with($prop, FilesPlugin::FILE_METADATA_PREFIX),
160165
);
161166

162167
// substr of calendars/ => path is inside the CalDAV component

0 commit comments

Comments
 (0)