Do not set full path if not currentAccess

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-04-13 12:58:29 +02:00
parent f57ef55249
commit b96297e9cc
No known key found for this signature in database
GPG key ID: F941078878347C0C

View 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()) {