msgstore: fetch missing headers in visual mode
fetches missing headers when in visual selection mode. This prevents large archive operations from panicking due to a nil pointer dereference. The archive command will return an error to the ui when a nil message is encountered to signal that the message store is not ready yet. Signed-off-by: Koni Marti <koni.marti@gmail.com>
This commit is contained in:
parent
44f81c87e4
commit
e5ad877af5
2 changed files with 10 additions and 0 deletions
commands
|
@ -188,6 +188,9 @@ func MsgInfoFromUids(store *lib.MessageStore, uids []uint32) ([]*models.MessageI
|
|||
if !ok {
|
||||
return nil, fmt.Errorf("uid not found")
|
||||
}
|
||||
if infos[i] == nil {
|
||||
return nil, fmt.Errorf("message store not ready yet")
|
||||
}
|
||||
}
|
||||
return infos, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue