From 554c4a7cf8d7ce81bb198e19acdb44997bc3f9b4 Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Wed, 8 Jan 2020 08:56:14 -0100 Subject: [PATCH] moving ->getParent earlier Signed-off-by: Maxence Lange --- apps/files_sharing/lib/Controller/ShareAPIController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files_sharing/lib/Controller/ShareAPIController.php b/apps/files_sharing/lib/Controller/ShareAPIController.php index b71d3dac3a..ceda0e46c0 100644 --- a/apps/files_sharing/lib/Controller/ShareAPIController.php +++ b/apps/files_sharing/lib/Controller/ShareAPIController.php @@ -865,8 +865,8 @@ class ShareAPIController extends OCSController { /** @var Node[] $nodes */ $nodes = []; while ($node->getPath() !== $basePath) { - $nodes[] = $node; $node = $node->getParent(); + $nodes[] = $node; } // for each nodes, retrieve shares.