summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-01-06 15:56:06 +0100
committerRobin Appelman <icewind@owncloud.com>2015-01-06 15:56:06 +0100
commit64e3ebae74b9f47369b946fbda89a0ce6f6ffe04 (patch)
treeb76f81ab5cddfa0f750cef219db3a3a835aeeec0 /lib
parent622c4cf77903470bc7ddc1df5b74d5e17a0e70c7 (diff)
downloadnextcloud-server-64e3ebae74b9f47369b946fbda89a0ce6f6ffe04.tar.gz
nextcloud-server-64e3ebae74b9f47369b946fbda89a0ce6f6ffe04.zip
Add error handling to getstoragestats.php
Diffstat (limited to 'lib')
-rw-r--r--lib/private/helper.php3
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;