1
1
Fork 0
mirror of https://github.com/mjl-/mox.git synced 2025-04-21 21:40:01 +03:00

fix bug in fixmsgize that makes it stop after the first batch of 10k messages

for issue  reported by naturalethic, thanks!

users upgrading from v0.0.6 to v0.0.7 could run into this. the release notes
have been updated with a link to the issue. the issue will stay open until at
least the next release.
This commit is contained in:
Mechiel Lukkien 2023-10-05 22:59:53 +02:00
parent 3aa5026e11
commit c4324fdaa1
No known key found for this signature in database

2
ctl.go
View file

@ -758,6 +758,7 @@ func servectlcmd(ctx context.Context, ctl *ctl, shutdown func()) {
q.SortAsc("ID")
return q.ForEach(func(m store.Message) error {
lastID = m.ID
n++
p := acc.MessagePath(m.ID)
st, err := os.Stat(p)
@ -810,7 +811,6 @@ func servectlcmd(ctx context.Context, ctl *ctl, shutdown func()) {
return fmt.Errorf("marshal parsed message: %v", err)
}
total++
n++
if err := tx.Update(&m); err != nil {
return fmt.Errorf("update message: %v", err)
}