]> source.dussan.org Git - nextcloud-server.git/commitdiff
feat(transfer-ownership): Improve verbose output of command
authorCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 7 Oct 2024 13:35:47 +0000 (15:35 +0200)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Mon, 7 Oct 2024 13:35:47 +0000 (15:35 +0200)
Makes debbuging way easier

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/files/lib/Service/OwnershipTransferService.php

index 14cbe882245f5dc337ad7340d1762e93d47f21ed..5a57fae50758268f2ad370ebb41b42d6cc857473 100644 (file)
@@ -420,6 +420,7 @@ class OwnershipTransferService {
 
                foreach ($shares as ['share' => $share, 'suffix' => $suffix]) {
                        try {
+                               $output->writeln('Transfering share ' . $share->getId() . ' of type ' . $share->getShareType(), OutputInterface::VERBOSITY_VERBOSE);
                                if ($share->getShareType() === IShare::TYPE_USER &&
                                        $share->getSharedWith() === $destinationUid) {
                                        // Unmount the shares before deleting, so we don't try to get the storage later on.
@@ -457,6 +458,7 @@ class OwnershipTransferService {
                                                        // Try to get the new ID from the target path and suffix of the share
                                                        $node = $rootFolder->get(Filesystem::normalizePath($targetLocation . '/' . $suffix));
                                                        $newNodeId = $node->getId();
+                                                       $output->writeln('Had to change node id to ' . $newNodeId, OutputInterface::VERBOSITY_VERY_VERBOSE);
                                                }
                                                $share->setNodeId($newNodeId);