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 bfd2f39fed
commit 20eda10441
No known key found for this signature in database
GPG key ID: 4C614C6ED2CDE6DF

View file

@ -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());