Transfer shares if no path provided

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2020-09-07 17:35:29 +02:00
parent 14c3f1ebd8
commit 818b69ec54
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
1 changed files with 2 additions and 2 deletions

View File

@ -244,7 +244,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 = [];
@ -257,7 +257,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());