quota: fix handling negative max size when configured for an account, and clarify value is in bytes in config file

for #115 by pmarini-nc
This commit is contained in:
Mechiel Lukkien
2024-01-12 15:02:16 +01:00
parent 7b6cfcd572
commit aea8740e65
5 changed files with 17 additions and 16 deletions

View File

@ -2015,7 +2015,7 @@ func (a *Account) AddMessageSize(log mlog.Log, tx *bstore.Tx, size int64) error
func (a *Account) QuotaMessageSize() int64 {
conf, _ := a.Conf()
size := conf.QuotaMessageSize
if size <= 0 {
if size == 0 {
size = mox.Conf.Static.QuotaMessageSize
}
if size < 0 {