Skip to content
Snippets Groups Projects
Unverified Commit f0b46ea6 authored by Joas Schilling's avatar Joas Schilling Committed by GitHub
Browse files

Merge pull request #22648 from nextcloud/bugfix/noid/transfer-all-shares

Transfer shares if no path provided
parents e280c050 aa04a26c
No related branches found
No related tags found
No related merge requests found
...@@ -247,7 +247,7 @@ class OwnershipTransferService { ...@@ -247,7 +247,7 @@ class OwnershipTransferService {
private function collectUsersShares(string $sourceUid, private function collectUsersShares(string $sourceUid,
OutputInterface $output, OutputInterface $output,
View $view, View $view,
?string $path = null): array { string $path): array {
$output->writeln("Collecting all share information for files and folders of $sourceUid ..."); $output->writeln("Collecting all share information for files and folders of $sourceUid ...");
$shares = []; $shares = [];
...@@ -260,7 +260,7 @@ class OwnershipTransferService { ...@@ -260,7 +260,7 @@ class OwnershipTransferService {
if (empty($sharePage)) { if (empty($sharePage)) {
break; break;
} }
if ($path !== null) { if ($path !== "$sourceUid/files") {
$sharePage = array_filter($sharePage, function (IShare $share) use ($view, $path) { $sharePage = array_filter($sharePage, function (IShare $share) use ($view, $path) {
try { try {
$relativePath = $view->getPath($share->getNodeId()); $relativePath = $view->getPath($share->getNodeId());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment