When doing a PROPFIND on the root and one of the mount points is not
available, the returned quota attributes will now be zero.
This fix prevents the expected exception to make the whole call fail.
* @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);
+ }
}
/**