From 715e7143f042f537ecbc2fcfd936e1996dec1ade Mon Sep 17 00:00:00 2001 From: provokateurin Date: Thu, 14 Nov 2024 07:41:41 +0100 Subject: fix(files_sharing,files): Do not validate shares before adjusting the owner Signed-off-by: provokateurin --- apps/files/lib/Service/OwnershipTransferService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps/files/lib') diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 80c61d39ef5..71764019abf 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -310,7 +310,7 @@ class OwnershipTransferService { foreach ($supportedShareTypes as $shareType) { $offset = 0; while (true) { - $sharePage = $this->shareManager->getSharesBy($sourceUid, $shareType, null, true, 50, $offset); + $sharePage = $this->shareManager->getSharesBy($sourceUid, $shareType, null, true, 50, $offset, onlyValid: false); $progress->advance(count($sharePage)); if (empty($sharePage)) { break; @@ -464,7 +464,7 @@ class OwnershipTransferService { } $share->setNodeId($newNodeId); - $this->shareManager->updateShare($share); + $this->shareManager->updateShare($share, onlyValid: false); } } } catch (NotFoundException $e) { -- cgit v1.2.3