aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2020-03-16 13:12:10 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2020-03-27 13:51:47 +0000
commit874c468c02dafa242e6560ac72f1a81070d84d5a (patch)
tree88a93d9b653660c071230922551a33ebcb0750a1 /lib
parent918c64a20091183c438aadafc0f18e49dd33e73f (diff)
downloadnextcloud-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.php5
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();
}