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:
Roeland Jago Douma 2020-03-16 13:12:10 +01:00
parent 48bdd322a2
commit 3443a00621
No known key found for this signature in database
GPG Key ID: F941078878347C0C
1 changed files with 5 additions and 0 deletions

View File

@ -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();
}