diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2020-03-16 13:12:10 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2020-03-16 13:12:10 +0100 |
commit | 3443a006217229061323c655790199e8e1349875 (patch) | |
tree | 099e4baa38f6714a2daaffb1a2245926020ec79f /lib | |
parent | 48bdd322a210e5e80ad1bb80ecbe86fad5ba28d1 (diff) | |
download | nextcloud-server-3443a006217229061323c655790199e8e1349875.tar.gz nextcloud-server-3443a006217229061323c655790199e8e1349875.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 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(); } |