Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2015-10-15 16:46:26 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2015-10-16 22:41:51 +0300
commit2e8232e80393cb88ba96dd4f3027fcfd4c4f64e3 (patch)
treee506eca53afdcd0da4ea7be439869d10bdf084ea /apps/files_trashbin
parentd749b9a5ac434418a081149ab056a2db4caf9a55 (diff)
Fix trashbin handling of unknown/unlimited free space
Diffstat (limited to 'apps/files_trashbin')
-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);