Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/private/connector/sabre/directory.php18
1 files changed, 11 insertions, 7 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php
index 1b6d1f363b8..0d35c7d528e 100644
--- a/lib/private/connector/sabre/directory.php
+++ b/lib/private/connector/sabre/directory.php
@@ -205,13 +205,17 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node
* @return array
*/
public function getQuotaInfo() {
- $path = \OC\Files\Filesystem::getView()->getRelativePath($this->info->getPath());
- $storageInfo = OC_Helper::getStorageInfo($path);
- return array(
- $storageInfo['used'],
- $storageInfo['free']
- );
-
+ try {
+ $path = \OC\Files\Filesystem::getView()->getRelativePath($this->info->getPath());
+ $storageInfo = OC_Helper::getStorageInfo($path);
+ return array(
+ $storageInfo['used'],
+ $storageInfo['free']
+ );
+ }
+ catch (\OCP\Files\StorageNotAvailableException $e) {
+ return array(0, 0);
+ }
}
/**