From 2e8232e80393cb88ba96dd4f3027fcfd4c4f64e3 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 15 Oct 2015 15:46:26 +0200 Subject: Fix trashbin handling of unknown/unlimited free space --- apps/files_trashbin/lib/trashbin.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'apps') 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); -- cgit v1.2.3