Revert "Fix for issue 10862: calculation of free space ignores external storage (doesn't count towards quota)"

This reverts commit e806aa658c.

Signed-off-by: Morris Jobke <hey@morrisjobke.de>
This commit is contained in:
Morris Jobke 2019-03-01 12:03:28 +01:00
parent fb5a2496e2
commit f6967a974f
No known key found for this signature in database
GPG Key ID: FE03C3A163FEDE68
1 changed files with 5 additions and 4 deletions

View File

@ -680,10 +680,11 @@ class Trashbin {
// calculate available space for trash bin
// subtract size of files and current trash bin size from quota
if ($softQuota) {
$files_view = new View('/' . $user . '/files');
$rootInfo = $files_view->getFileInfo('/', false);
$free = $quota - $rootInfo['size']; // remaining free space for user
$userFolder = \OC::$server->getUserFolder($user);
if(is_null($userFolder)) {
return 0;
}
$free = $quota - $userFolder->getSize(); // remaining free space for user
if ($free > 0) {
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $trashbinSize; // how much space can be used for versions
} else {