diff --git a/lib/Dav/Faces/PropFindPlugin.php b/lib/Dav/Faces/PropFindPlugin.php index adc31ee9..dcbca67e 100644 --- a/lib/Dav/Faces/PropFindPlugin.php +++ b/lib/Dav/Faces/PropFindPlugin.php @@ -50,13 +50,10 @@ public function propFind(PropFind $propFind, INode $node) { ) ); }); - $propFind->handle(self::FILE_NAME_PROPERTYNAME, function () use ($node) { - return $node->getFile()->getName(); - }); + $propFind->handle(self::FILE_NAME_PROPERTYNAME, fn () => $node->getFile()->getName()); $propFind->handle(self::REALPATH_PROPERTYNAME, fn () => $node->getFile()->getPath()); $propFind->handle(FilesPlugin::INTERNAL_FILEID_PROPERTYNAME, fn () => $node->getFile()->getId()); $propFind->handle(FilesPlugin::GETETAG_PROPERTYNAME, fn () => $node->getETag()); - $propFind->handle(self::FILE_NAME_PROPERTYNAME, fn () => $node->getFile()->getName()); $propFind->handle(TagsPlugin::FAVORITE_PROPERTYNAME, fn () => $node->isFavorite() ? 1 : 0); $propFind->handle(FilesPlugin::HAS_PREVIEW_PROPERTYNAME, fn () => json_encode($this->previewManager->isAvailable($node->getFile()->getFileInfo()))); $propFind->handle(FilesPlugin::PERMISSIONS_PROPERTYNAME, function () use ($node): string { diff --git a/lib/Service/StorageService.php b/lib/Service/StorageService.php index 085fc902..2d443fe9 100644 --- a/lib/Service/StorageService.php +++ b/lib/Service/StorageService.php @@ -66,11 +66,11 @@ public function getMounts(): \Generator { // Only crawl files, not cache or trashbin $qb = new CacheQueryBuilder($this->db, $this->systemConfig, $this->logger, $this->metadataManager); try { - /** @var array|false $root */ $result = $qb->selectFileCache() ->andWhere($qb->expr()->eq('filecache.storage', $qb->createNamedParameter($storageId, IQueryBuilder::PARAM_INT))) ->andWhere($qb->expr()->eq('filecache.path', $qb->createNamedParameter('files'))) ->executeQuery(); + /** @var array|false $root */ $root = $result->fetch(); $result->closeCursor(); if ($root !== false) {