diff options
Diffstat (limited to 'core/Command/Preview/Generate.php')
-rw-r--r-- | core/Command/Preview/Generate.php | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/core/Command/Preview/Generate.php b/core/Command/Preview/Generate.php index a885d224fc7..86528319199 100644 --- a/core/Command/Preview/Generate.php +++ b/core/Command/Preview/Generate.php @@ -121,11 +121,7 @@ class Generate extends Command { } $mount = $mounts[0]; $userFolder = $this->rootFolder->getUserFolder($mount->getUser()->getUID()); - $nodes = $userFolder->getById((int)$fileInput); - if (!$nodes) { - return null; - } - return $nodes[0]; + return $userFolder->getFirstNodeById((int)$fileInput); } else { try { return $this->rootFolder->get($fileInput); |