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:
authorMorris Jobke <hey@morrisjobke.de>2014-10-28 11:33:54 +0300
committerMorris Jobke <hey@morrisjobke.de>2014-10-28 11:33:54 +0300
commit4461e69873aac223fea410d8e78c3e7674541c17 (patch)
tree09d5ec0c89b02274c6832a58fef8ecb615459ef6
parent23873d80fe1bf7c47a991acbbcf52e68c9aebf83 (diff)
parent21d825ed6c11425d36a143f8ed63f1e3852d0aeb (diff)
Merge pull request #11791 from owncloud/webdav-getquotainfo-503-handling
Properly catch 503 storage not available in getQuotaInfo
-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);
+ }
}
/**