]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not set full path if not currentAccess
authorRoeland Jago Douma <roeland@famdouma.nl>
Thu, 13 Apr 2017 10:58:29 +0000 (12:58 +0200)
committerRoeland Jago Douma <roeland@famdouma.nl>
Thu, 13 Apr 2017 10:58:53 +0000 (12:58 +0200)
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
lib/private/Share20/Manager.php

index 8b670da544b552eead54aa329708d45da8bd857a..6e59629153e1c8d5338126a43bd1794069db1aee 100644 (file)
@@ -1242,12 +1242,17 @@ class Manager implements IManager {
                /** @var Node[] $nodes */
                $nodes = [];
 
-               $ownerPath = $path->getPath();
-               list(,,,$ownerPath) = explode('/', $ownerPath, 4);
-               $al['users'][$owner] = [
-                       'node_id' => $path->getId(),
-                       'node_path' => '/' . $ownerPath,
-               ];
+
+               if ($currentAccess) {
+                       $ownerPath = $path->getPath();
+                       list(, , , $ownerPath) = explode('/', $ownerPath, 4);
+                       $al['users'][$owner] = [
+                               'node_id' => $path->getId(),
+                               'node_path' => '/' . $ownerPath,
+                       ];
+               } else {
+                       $al['users'][] = $owner;
+               }
 
                // Collect all the shares
                while ($path->getPath() !== $userFolder->getPath()) {