Fix trashbin handling of unknown/unlimited free space

This commit is contained in:
Robin Appelman 2015-10-15 15:46:26 +02:00 committed by Thomas Müller
parent d749b9a5ac
commit 2e8232e803

View File

@ -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);