diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-03-16 13:12:10 +0100 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2020-03-27 13:51:47 +0000 |
commit | 874c468c02dafa242e6560ac72f1a81070d84d5a (patch) | |
tree | 88a93d9b653660c071230922551a33ebcb0750a1 /lib | |
parent | 918c64a20091183c438aadafc0f18e49dd33e73f (diff) | |
download | nextcloud-server-874c468c02dafa242e6560ac72f1a81070d84d5a.tar.gz nextcloud-server-874c468c02dafa242e6560ac72f1a81070d84d5a.zip |
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>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/View.php | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 2c01c112ad4..9aaa37feee9 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -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(); } |