Fix getting the access list on external storage

If a file is on external storage there is no owner. WHich means we can't
check. So just return an empty array then.

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2019-03-19 15:38:52 +01:00
parent ff6f105ea6
commit 230dc505a1
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 7 additions and 1 deletions

View File

@ -1408,7 +1408,13 @@ class Manager implements IManager {
* @return array
*/
public function getAccessList(\OCP\Files\Node $path, $recursive = true, $currentAccess = false) {
$owner = $path->getOwner()->getUID();
$owner = $path->getOwner();
if ($owner === null) {
return [];
}
$owner = $owner->getUID();
if ($currentAccess) {
$al = ['users' => [], 'remote' => [], 'public' => false];