From 0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425 Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Thu, 6 Mar 2014 13:50:53 +0100 Subject: Fixed upload issue when free space is not known --- lib/private/helper.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/private') diff --git a/lib/private/helper.php b/lib/private/helper.php index d8c4650f666..b9956d5ec1c 100644 --- a/lib/private/helper.php +++ b/lib/private/helper.php @@ -839,7 +839,7 @@ class OC_Helper { * @return int number of bytes representing */ public static function maxUploadFilesize($dir, $freeSpace = null) { - if (is_null($freeSpace)){ + if (is_null($freeSpace) || $freeSpace < 0){ $freeSpace = self::freeSpace($dir); } return min($freeSpace, self::uploadLimit()); -- cgit v1.2.3