summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-06 13:50:53 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-06 13:53:55 +0100
commit0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425 (patch)
treef8b01bae69374f5deef25140ab6ec9642baac602 /lib/private
parent07f78c824833bfcb3233f881286dc625d81e44f6 (diff)
downloadnextcloud-server-0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425.tar.gz
nextcloud-server-0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425.zip
Fixed upload issue when free space is not known
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/helper.php2
1 files changed, 1 insertions, 1 deletions
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());