]> source.dussan.org Git - nextcloud-server.git/commitdiff
Transfer shares if no path provided 22648/head
authorJulius Härtl <jus@bitgrid.net>
Mon, 7 Sep 2020 15:35:29 +0000 (17:35 +0200)
committerJulius Härtl <jus@bitgrid.net>
Mon, 7 Sep 2020 15:35:29 +0000 (17:35 +0200)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
apps/files/lib/Service/OwnershipTransferService.php

index 9f3e530478d0009274a93f6b2c6f537b09e4d4a5..1fe9f037d0c23c729ce276072d958d76e6062451 100644 (file)
@@ -246,7 +246,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 = [];
@@ -259,7 +259,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());