aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files/lib/BackgroundJob/TransferOwnership.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files/lib/BackgroundJob/TransferOwnership.php')
-rw-r--r--apps/files/lib/BackgroundJob/TransferOwnership.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/apps/files/lib/BackgroundJob/TransferOwnership.php b/apps/files/lib/BackgroundJob/TransferOwnership.php
index 1f182b5e999..5cf35396d43 100644
--- a/apps/files/lib/BackgroundJob/TransferOwnership.php
+++ b/apps/files/lib/BackgroundJob/TransferOwnership.php
@@ -61,14 +61,14 @@ class TransferOwnership extends QueuedJob {
$fileId = $transfer->getFileId();
$userFolder = $this->rootFolder->getUserFolder($sourceUser);
- $nodes = $userFolder->getById($fileId);
+ $node = $userFolder->getFirstNodeById($fileId);
- if (empty($nodes)) {
+ if (!$node) {
$this->logger->alert('Could not transfer ownership: Node not found');
$this->failedNotication($transfer);
return;
}
- $path = $userFolder->getRelativePath($nodes[0]->getPath());
+ $path = $userFolder->getRelativePath($node->getPath());
$sourceUserObject = $this->userManager->get($sourceUser);
$destinationUserObject = $this->userManager->get($destinationUser);