Allow public upload when the quota is unlimited (#24988)

This commit is contained in:
Joas Schilling 2016-06-06 13:48:38 +02:00 committed by Thomas Müller
parent 6e7eb87c80
commit afb4c1e694
2 changed files with 2 additions and 2 deletions

View File

@ -314,7 +314,7 @@ class ShareController extends Controller {
* The OC_Util methods require a view. This just uses the node API
*/
$freeSpace = $share->getNode()->getStorage()->free_space($share->getNode()->getInternalPath());
if ($freeSpace !== \OCP\Files\FileInfo::SPACE_UNKNOWN) {
if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) {
$freeSpace = max($freeSpace, 0);
} else {
$freeSpace = (INF > 0) ? INF: PHP_INT_MAX; // work around https://bugs.php.net/bug.php?id=69188

View File

@ -500,7 +500,7 @@ class OC_Helper {
*/
public static function freeSpace($dir) {
$freeSpace = \OC\Files\Filesystem::free_space($dir);
if ($freeSpace !== \OCP\Files\FileInfo::SPACE_UNKNOWN) {
if ($freeSpace < \OCP\Files\FileInfo::SPACE_UNLIMITED) {
$freeSpace = max($freeSpace, 0);
return $freeSpace;
} else {