diff --git a/apps/files/lib/Service/OwnershipTransferService.php b/apps/files/lib/Service/OwnershipTransferService.php index 15110e4349f03..ce98521c99adb 100644 --- a/apps/files/lib/Service/OwnershipTransferService.php +++ b/apps/files/lib/Service/OwnershipTransferService.php @@ -109,8 +109,8 @@ public function transfer( // a lazy root folder which does not create the destination users folder \OC_Util::setupFS($sourceUser->getUID()); \OC_Util::setupFS($destinationUser->getUID()); - \OC::$server->getUserFolder($sourceUser->getUID()); - \OC::$server->getUserFolder($destinationUser->getUID()); + $this->rootFolder->getUserFolder($sourceUser->getUID()); + $this->rootFolder->getUserFolder($destinationUser->getUID()); Filesystem::initMountPoints($sourceUid); Filesystem::initMountPoints($destinationUid); @@ -477,7 +477,7 @@ private function restoreShares( } catch (\OCP\Files\NotFoundException) { // ID has changed due to transfer between different storages // Try to get the new ID from the target path and suffix of the share - $node = $rootFolder->get(Filesystem::normalizePath($targetLocation . '/' . $suffix)); + $node = $this->rootFolder->get(Filesystem::normalizePath($targetLocation . '/' . $suffix)); $newNodeId = $node->getId(); $output->writeln('Had to change node id to ' . $newNodeId, OutputInterface::VERBOSITY_VERY_VERBOSE); }