diff options
-rw-r--r-- | lib/private/files/view.php | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/files/view.php b/lib/private/files/view.php index 357f854e5e2..6bc1ac46ef3 100644 --- a/lib/private/files/view.php +++ b/lib/private/files/view.php @@ -1573,10 +1573,15 @@ class View { * Get the owner for a file or folder * * @param string $path - * @return string + * @return string the user id of the owner + * @throws NotFoundException */ public function getOwner($path) { - return $this->basicOperation('getOwner', $path); + $info = $this->getFileInfo($path); + if (!$info) { + throw new NotFoundException($path . 'not found while trying to get owner'); + } + return $info->getOwner()->getUID(); } /** |