diff --git a/patches/014-add-mail-usage.patch b/patches/014-add-mail-usage.patch index ca86e28f93a345042ff6685d8900476ea3acefd6..0283a63b5d9f01e5128bdd671114372ced002daa 100644 --- a/patches/014-add-mail-usage.patch +++ b/patches/014-add-mail-usage.patch @@ -29,7 +29,7 @@ } else { $free = $this->storage->free_space($path); - $quotaFree = max($this->getQuota() - $used, 0); -+ $ownerId = $this->storage->getUser()->getUID(); ++ $ownerId = $this->storage->getOwner($path); + $mailQuotaUsage = (int) \OC::$server->getConfig()->getUserValue($ownerId, 'ecloud-accounts', 'mailQuotaUsage', 0); + $mailQuotaUsage = max($mailQuotaUsage, 0); // to avoid negative mail quota usage value + $quotaFree = max($this->getQuota() - $used - $mailQuotaUsage, 0);