diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/helper.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/helper.php b/lib/private/helper.php index fb4ddfae3b7..8e9b7d3b6f3 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -905,6 +905,9 @@ class OC_Helper { if (!$rootInfo) { $rootInfo = \OC\Files\Filesystem::getFileInfo($path, false); } + if (!$rootInfo instanceof \OCP\Files\FileInfo) { + throw new \OCP\Files\NotFoundException(); + } $used = $rootInfo->getSize(); if ($used < 0) { $used = 0; |