Merge pull request #11791 from owncloud/webdav-getquotainfo-503-handling
Properly catch 503 storage not available in getQuotaInfo
This commit is contained in:
commit
4461e69873
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue