diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index c2fbd5a8997..8eb031df554 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -241,7 +241,7 @@ class OwnershipTransferService { private function collectUsersShares(string $sourceUid, OutputInterface $output, View $view, - ?string $path = null): array { + string $path): array { $output->writeln("Collecting all share information for files and folders of $sourceUid ..."); $shares = []; @@ -254,7 +254,7 @@ class OwnershipTransferService { if (empty($sharePage)) { break; } - if ($path !== null) { + if ($path !== "$sourceUid/files") { $sharePage = array_filter($sharePage, function (IShare $share) use ($view, $path) { try { $relativePath = $view->getPath($share->getNodeId());