Skip to content
Snippets Groups Projects
Commit e806aa65 authored by Felix Nieuwenhuizen's avatar Felix Nieuwenhuizen
Browse files

Fix for issue 10862: calculation of free space ignores external storage...

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

Signed-off-by: default avatarFelix Nieuwenhuizen <felix@tdlrali.com>
parent a501193b
No related branches found
No related tags found
No related merge requests found
......@@ -680,11 +680,10 @@ class Trashbin {
// calculate available space for trash bin
// subtract size of files and current trash bin size from quota
if ($softQuota) {
$userFolder = \OC::$server->getUserFolder($user);
if(is_null($userFolder)) {
return 0;
}
$free = $quota - $userFolder->getSize(); // remaining free space for user
$files_view = new View('/' . $user . '/files');
$rootInfo = $files_view->getFileInfo('/', false);
$free = $quota - $rootInfo['size']; // remaining free space for user
if ($free > 0) {
$availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $trashbinSize; // how much space can be used for versions
} else {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment