diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/connector/sabre/directory.php | 6 | ||||
-rw-r--r-- | lib/helper.php | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/lib/connector/sabre/directory.php b/lib/connector/sabre/directory.php index ed8d085462d..66cd2fcd4e3 100644 --- a/lib/connector/sabre/directory.php +++ b/lib/connector/sabre/directory.php @@ -233,10 +233,10 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa * @return array */ public function getQuotaInfo() { - $rootInfo=\OC\Files\Filesystem::getFileInfo(''); + $storageInfo = OC_Helper::getStorageInfo($this->path); return array( - $rootInfo['size'], - \OC\Files\Filesystem::free_space() + $storageInfo['used'], + $storageInfo['total'] ); } diff --git a/lib/helper.php b/lib/helper.php index c7687d431e1..128786087b8 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -843,13 +843,13 @@ class OC_Helper { /** * Calculate the disc space */ - public static function getStorageInfo() { - $rootInfo = \OC\Files\Filesystem::getFileInfo('/'); + public static function getStorageInfo($path = '/') { + $rootInfo = \OC\Files\Filesystem::getFileInfo($path); $used = $rootInfo['size']; if ($used < 0) { $used = 0; } - $free = \OC\Files\Filesystem::free_space(); + $free = \OC\Files\Filesystem::free_space($path); if ($free >= 0) { $total = $free + $used; } else { |