diff options
author | Morris Jobke <hey@morrisjobke.de> | 2014-10-28 09:33:54 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2014-10-28 09:33:54 +0100 |
commit | 4461e69873aac223fea410d8e78c3e7674541c17 (patch) | |
tree | 09d5ec0c89b02274c6832a58fef8ecb615459ef6 /lib | |
parent | 23873d80fe1bf7c47a991acbbcf52e68c9aebf83 (diff) | |
parent | 21d825ed6c11425d36a143f8ed63f1e3852d0aeb (diff) | |
download | nextcloud-server-4461e69873aac223fea410d8e78c3e7674541c17.tar.gz nextcloud-server-4461e69873aac223fea410d8e78c3e7674541c17.zip |
Merge pull request #11791 from owncloud/webdav-getquotainfo-503-handling
Properly catch 503 storage not available in getQuotaInfo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/connector/sabre/directory.php | 18 |
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); + } } /** |