Transfer shares if no path provided
Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
parent
14c3f1ebd8
commit
818b69ec54
|
@ -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());
|
||||||
|
|
Loading…
Reference in New Issue