From 3443a006217229061323c655790199e8e1349875 Mon Sep 17 00:00:00 2001 From: Roeland Jago Douma Date: Mon, 16 Mar 2020 13:12:10 +0100 Subject: [PATCH] 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 --- lib/private/Files/View.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 90ac1e1988d..8ea94626a2a 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(); } -- 2.39.5