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

Prevent spurious warnings about thread ids not being correct for messages that are expunged but not yet erased.

Erasing a message (removing the message file from the file system) was made a
separate step a few days ago. The verifydata command checks for consistency of
the data, but didn't correctly skip checking expunged-but-not-yet-erased
messages, leading to the warning.

A similar consistency check in store/account.go does check for that.

I was warned by my nightly backup+veridata script.
This commit is contained in:
Mechiel Lukkien 2025-03-08 09:03:41 +01:00
parent 2314397078
commit 0857e81a6c
No known key found for this signature in database

View file

@ -310,7 +310,7 @@ possibly making them potentially no longer readable by the previous version.
}
for i, pid := range m.ThreadParentIDs {
am := store.Message{ID: pid}
if err := db.Get(ctxbg, &am); err == bstore.ErrAbsent {
if err := db.Get(ctxbg, &am); err == bstore.ErrAbsent || err == nil && am.Expunged {
continue
} else if err != nil {
return fmt.Errorf("get ancestor message: %v", err)