diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-21 12:56:57 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-21 12:56:57 +0200 |
commit | 8f2759de21a741c1f7e7ccfeedd230fe51d81bd1 (patch) | |
tree | d5602fccc0ac0ae0c957f6388138a339638e0ba9 | |
parent | 2aed501f7fbe146cd476b16c4549d72011a719aa (diff) | |
parent | 7c86d79374f46b5434bd06f8a411f74ff11b8977 (diff) | |
download | nextcloud-server-8f2759de21a741c1f7e7ccfeedd230fe51d81bd1.tar.gz nextcloud-server-8f2759de21a741c1f7e7ccfeedd230fe51d81bd1.zip |
Merge pull request #23548 from owncloud/stable8.2-quota-recognizeremoteunlimitedquota
[stable8.2] Workaround to be able to recognize unlimited quota in fed shares
-rw-r--r-- | lib/private/files/storage/dav.php | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/private/files/storage/dav.php b/lib/private/files/storage/dav.php index dcde7b8029b..c2e10cf71a7 100644 --- a/lib/private/files/storage/dav.php +++ b/lib/private/files/storage/dav.php @@ -413,7 +413,14 @@ class DAV extends Common { // TODO: cacheable ? $response = $this->client->propfind($this->encodePath($path), array('{DAV:}quota-available-bytes')); if (isset($response['{DAV:}quota-available-bytes'])) { - return (int)$response['{DAV:}quota-available-bytes']; + $freeSpace = (int)$response['{DAV:}quota-available-bytes']; + if ($freeSpace === FileInfo::SPACE_UNLIMITED) { + // most of the code cannot cope with unlimited storage, + // so as a workaround convert to SPACE_UNKNOWN which is a + // value recognized in many places + return FileInfo::SPACE_UNKNOWN; + } + return $freeSpace; } else { return FileInfo::SPACE_UNKNOWN; } |