diff options
-rw-r--r-- | apps/files_versions/lib/Storage.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php index 4ed3977435b..c09633be3c1 100644 --- a/apps/files_versions/lib/Storage.php +++ b/apps/files_versions/lib/Storage.php @@ -752,13 +752,14 @@ class Storage { if ($softQuota) { $userFolder = \OC::$server->getUserFolder($uid); if(is_null($userFolder)) { - return 0; - } - $free = $quota - $userFolder->getSize(false); // remaining free space for user - if ($free > 0) { - $availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $versionsSize; // how much space can be used for versions + $availableSpace = 0; } else { - $availableSpace = $free - $versionsSize; + $free = $quota - $userFolder->getSize(false); // remaining free space for user + if ($free > 0) { + $availableSpace = ($free * self::DEFAULTMAXSIZE / 100) - $versionsSize; // how much space can be used for versions + } else { + $availableSpace = $free - $versionsSize; + } } } else { $availableSpace = $quota; |