summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2014-03-06 17:22:40 +0100
committerVincent Petry <pvince81@owncloud.com>2014-03-06 17:22:40 +0100
commit536c33895f3e721492e30b19e02e4f1889207d34 (patch)
treeb00ab14da86ecbd88e5b88531e703f6e7db53270 /lib
parent1b8cf18c9163cf6d16d679500a86def95bfc0384 (diff)
parent0dcac65aa1eb14adc4d3693b6a2c99cbf6ea2425 (diff)
downloadnextcloud-server-536c33895f3e721492e30b19e02e4f1889207d34.tar.gz
nextcloud-server-536c33895f3e721492e30b19e02e4f1889207d34.zip
Merge pull request #7592 from owncloud/fixstoragefreespace
Fixed upload issue when free space is not known (ex: FTP)
Diffstat (limited to 'lib')
-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());