Allow public upload when the quota is unlimited (#24988)
This commit is contained in:
parent
6e7eb87c80
commit
afb4c1e694
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue