diff options
author | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2024-11-04 10:09:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-04 10:09:58 +0100 |
commit | 901496276bccecc90c6b8cd247cc963073f23f52 (patch) | |
tree | 51755c64f5176d498c20b4e7d676c1bfdcfce486 /apps | |
parent | 6c283189ccd9781f608bcb90c4630279b85ef167 (diff) | |
parent | d6ba52426351e10abb2b34c80c8f00da63afc32b (diff) | |
download | nextcloud-server-901496276bccecc90c6b8cd247cc963073f23f52.tar.gz nextcloud-server-901496276bccecc90c6b8cd247cc963073f23f52.zip |
Merge pull request #47425 from nextcloud/fix/avoid-invalid-share-on-transfer-ownership
fix: promote re-shares when deleting the parent share
Diffstat (limited to 'apps')
-rw-r--r-- | apps/files/lib/Service/OwnershipTransferService.php | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 1c48a1eafc4..80c61d39ef5 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -150,16 +150,6 @@ class OwnershipTransferService { $output ); - $destinationPath = $finalTarget . '/' . $path; - // restore the shares - $this->restoreShares( - $sourceUid, - $destinationUid, - $destinationPath, - $shares, - $output - ); - // transfer the incoming shares if ($transferIncomingShares === true) { $sourceShares = $this->collectIncomingShares( @@ -184,6 +174,16 @@ class OwnershipTransferService { $move ); } + + $destinationPath = $finalTarget . '/' . $path; + // restore the shares + $this->restoreShares( + $sourceUid, + $destinationUid, + $destinationPath, + $shares, + $output + ); } private function sanitizeFolderName(string $name): string { |