Fix uploading when free space is unlimited

A federated share can report unlimited quota as -3, so the
ajax/upload.php code needs to be adjusted to block uploads when the free
space is unlimited.
This commit is contained in:
Vincent Petry 2016-03-07 10:42:36 +01:00
parent c07b731689
commit 60d8046c35
1 changed files with 1 additions and 1 deletions

View File

@ -138,7 +138,7 @@ $maxHumanFileSize = OCP\Util::humanFileSize($maxUploadFileSize);
$totalSize = 0;
$isReceivedShare = \OC::$server->getRequest()->getParam('isReceivedShare', false) === 'true';
// defer quota check for received shares
if (!$isReceivedShare) {
if (!$isReceivedShare && $storageStats['freeSpace'] >= 0) {
foreach ($files['size'] as $size) {
$totalSize += $size;
}