Skip to content

Commit

Permalink
Merge pull request #22648 from nextcloud/bugfix/noid/transfer-all-shares
Browse files Browse the repository at this point in the history
Transfer shares if no path provided
  • Loading branch information
nickvergessen committed Sep 9, 2020
2 parents e280c05 + aa04a26 commit f0b46ea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apps/files/lib/Service/OwnershipTransferService.php
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ function (FileInfo $fileInfo) use ($progress) {
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 = [];
Expand All @@ -260,7 +260,7 @@ private function collectUsersShares(string $sourceUid,
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());
Expand Down

0 comments on commit f0b46ea

Please sign in to comment.