From c1876ea51c07f2e513003f6a2d752312470371fc Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 7 Mar 2016 10:42:36 +0100 Subject: [PATCH] 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. --- apps/files/ajax/upload.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/files/ajax/upload.php b/apps/files/ajax/upload.php index 36aaed5ad9..d14414125f 100644 --- a/apps/files/ajax/upload.php +++ b/apps/files/ajax/upload.php @@ -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; }