summaryrefslogtreecommitdiffstats
path: root/apps/files_trashbin/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-10-15 15:46:26 +0200
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-16 21:41:51 +0200
commit2e8232e80393cb88ba96dd4f3027fcfd4c4f64e3 (patch)
treee506eca53afdcd0da4ea7be439869d10bdf084ea /apps/files_trashbin/lib
parentd749b9a5ac434418a081149ab056a2db4caf9a55 (diff)
downloadnextcloud-server-2e8232e80393cb88ba96dd4f3027fcfd4c4f64e3.tar.gz
nextcloud-server-2e8232e80393cb88ba96dd4f3027fcfd4c4f64e3.zip
Fix trashbin handling of unknown/unlimited free space
Diffstat (limited to 'apps/files_trashbin/lib')
-rw-r--r--apps/files_trashbin/lib/trashbin.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/files_trashbin/lib/trashbin.php b/apps/files_trashbin/lib/trashbin.php
index ef015c3566a..839a47a7bf2 100644
--- a/apps/files_trashbin/lib/trashbin.php
+++ b/apps/files_trashbin/lib/trashbin.php
@@ -581,8 +581,9 @@ class Trashbin {
if ($quota === null || $quota === 'none') {
$quota = \OC\Files\Filesystem::free_space('/');
$softQuota = false;
- if ($quota === \OCP\Files\FileInfo::SPACE_UNKNOWN) {
- $quota = 0;
+ // inf or unknown free space
+ if ($quota < 0) {
+ $quota = PHP_INT_MAX;
}
} else {
$quota = \OCP\Util::computerFileSize($quota);