Loading patches/014-add-mail-usage.patch +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading Loading
patches/014-add-mail-usage.patch +1 −1 Original line number Diff line number Diff line Loading @@ -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); Loading