From c4324fdaa1309ded196ba6d22fee7df8624ddfa2 Mon Sep 17 00:00:00 2001 From: Mechiel Lukkien Date: Thu, 5 Oct 2023 22:59:53 +0200 Subject: [PATCH] fix bug in fixmsgize that makes it stop after the first batch of 10k messages for issue #71 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. --- ctl.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ctl.go b/ctl.go index 76dee41..2970590 100644 --- a/ctl.go +++ b/ctl.go @@ -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) }