summaryrefslogtreecommitdiffstats
path: root/lib/helper.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/helper.php')
-rw-r--r--lib/helper.php8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/helper.php b/lib/helper.php
index 0f810ffc0c2..add5c66e7be 100644
--- a/lib/helper.php
+++ b/lib/helper.php
@@ -762,9 +762,13 @@ class OC_Helper {
$maxUploadFilesize = min($upload_max_filesize, $post_max_size);
$freeSpace = \OC\Files\Filesystem::free_space($dir);
- $freeSpace = max($freeSpace, 0);
+ if($freeSpace !== \OC\Files\FREE_SPACE_UNKNOWN){
+ $freeSpace = max($freeSpace, 0);
- return min($maxUploadFilesize, $freeSpace);
+ return min($maxUploadFilesize, $freeSpace);
+ } else {
+ return $maxUploadFilesize;
+ }
}
/**