diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-21 12:51:53 +0200 |
---|---|---|
committer | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-04-21 12:51:53 +0200 |
commit | e5691ab5cc703e6fab4f1b29ef8bafa455fa1d09 (patch) | |
tree | ede8b966c9dd0653e180aed778d1d7fc7a831776 | |
parent | e04f994fb3db4e0c844bfcffaac0846c309e80ad (diff) | |
parent | 8adbc41aa0d5d429526613eb42fcc85e0c0ee8b7 (diff) | |
download | nextcloud-server-e5691ab5cc703e6fab4f1b29ef8bafa455fa1d09.tar.gz nextcloud-server-e5691ab5cc703e6fab4f1b29ef8bafa455fa1d09.zip |
Merge pull request #24148 from owncloud/stable8-quota-recognizeremoteunlimitedquota
[stable8] 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 c97a0e59aee..686916b7726 100644 --- a/lib/private/files/storage/dav.php +++ b/lib/private/files/storage/dav.php @@ -255,7 +255,14 @@ class DAV extends \OC\Files\Storage\Common { try { $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 === \OCP\Files\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 \OCP\Files\FileInfo::SPACE_UNKNOWN; + } + return $freeSpace; } else { return \OCP\Files\FileInfo::SPACE_UNKNOWN; } |