mirror of
https://github.com/mjl-/mox.git
synced 2025-07-13 02:54:38 +03:00
fix warnings by ineffassign, with a one actual issue
In store/search.go, we would make a copy of a byte array, but then still use the original instead of the copy. Could result in search operations not finding messages that do have the content, but under very unlikely conditions only. We'll keep running ineffassign with "make check", useful enough.
This commit is contained in:
@ -3424,18 +3424,16 @@ func (c *conn) deliver(ctx context.Context, recvHdrFor func(string) string, msgW
|
||||
return fmt.Errorf("finding rejects mailbox: %v", err)
|
||||
}
|
||||
|
||||
hasSpace := true
|
||||
if !conf.KeepRejects && mbrej != nil {
|
||||
var chl []store.Change
|
||||
chl, hasSpace, err = a.d.acc.TidyRejectsMailbox(c.log, tx, mbrej)
|
||||
chl, hasSpace, err := a.d.acc.TidyRejectsMailbox(c.log, tx, mbrej)
|
||||
if err != nil {
|
||||
return fmt.Errorf("tidying rejects mailbox: %v", err)
|
||||
}
|
||||
changes = append(changes, chl...)
|
||||
if !hasSpace {
|
||||
log.Info("not storing spammy mail to full rejects mailbox")
|
||||
return nil
|
||||
}
|
||||
changes = append(changes, chl...)
|
||||
}
|
||||
if mbrej == nil {
|
||||
nmb, chl, _, _, err := a.d.acc.MailboxCreate(tx, conf.RejectsMailbox, store.SpecialUse{})
|
||||
|
Reference in New Issue
Block a user