summaryrefslogtreecommitdiffstats
path: root/apps/dav/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2016-02-24 10:39:04 +0100
committerVincent Petry <pvince81@owncloud.com>2016-02-29 14:36:20 +0100
commit11215f4e275f7e7d1aafdb8af440550d27562ad8 (patch)
tree3d133edb995e6e989d27ad02ef1e518ecb8fea52 /apps/dav/lib
parenta38e8b6436ccfe173b4d368d094753c71bdbd69f (diff)
downloadnextcloud-server-11215f4e275f7e7d1aafdb8af440550d27562ad8.tar.gz
nextcloud-server-11215f4e275f7e7d1aafdb8af440550d27562ad8.zip
Return -3 for unlimited quota
Returns -3 for unlimited quota in Webdav response. Also adjusted personal page to show unlimited quota when set.
Diffstat (limited to 'apps/dav/lib')
-rw-r--r--apps/dav/lib/connector/sabre/directory.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/apps/dav/lib/connector/sabre/directory.php b/apps/dav/lib/connector/sabre/directory.php
index 0119879a171..f31eff30b65 100644
--- a/apps/dav/lib/connector/sabre/directory.php
+++ b/apps/dav/lib/connector/sabre/directory.php
@@ -291,9 +291,14 @@ class Directory extends \OCA\DAV\Connector\Sabre\Node
}
try {
$storageInfo = \OC_Helper::getStorageInfo($this->info->getPath(), $this->info);
+ if ($storageInfo['quota'] === \OCP\Files\FileInfo::SPACE_UNLIMITED) {
+ $free = \OCP\Files\FileInfo::SPACE_UNLIMITED;
+ } else {
+ $free = $storageInfo['free'];
+ }
$this->quotaInfo = array(
$storageInfo['used'],
- $storageInfo['free']
+ $free
);
return $this->quotaInfo;
} catch (\OCP\Files\StorageNotAvailableException $e) {