mirror of https://github.com/nextcloud/server
Actually check if the owner is not null
Else this can error out on storages that do not have an owner (e.g. groupfolders). Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
parent
48bdd322a2
commit
3443a00621
|
@ -1687,6 +1687,11 @@ class View {
|
|||
if (!$info) {
|
||||
throw new NotFoundException($path . ' not found while trying to get owner');
|
||||
}
|
||||
|
||||
if ($info->getOwner() === null) {
|
||||
throw new NotFoundException($path . ' has no owner');
|
||||
}
|
||||
|
||||
return $info->getOwner()->getUID();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue