mirror of
https://github.com/ProtonMail/proton-bridge.git
synced 2025-12-11 13:16:53 +00:00
Fix panic when stopping import progress during loading mailboxes info
This commit is contained in:
@ -46,8 +46,12 @@ func (p *IMAPProvider) TransferTo(rules transferRules, progress *Progress, ch ch
|
||||
imapMessageInfoMap := p.loadMessageInfoMap(rules, progress)
|
||||
|
||||
for rule := range rules.iterateActiveRules() {
|
||||
log.WithField("rule", rule).Debug("Processing rule")
|
||||
messagesInfo := imapMessageInfoMap[rule.SourceMailbox.Name]
|
||||
if messagesInfo == nil {
|
||||
log.WithField("rule", rule).Warn("Rule has no message info")
|
||||
continue
|
||||
}
|
||||
log.WithField("rule", rule).Debug("Processing rule")
|
||||
p.transferTo(rule, messagesInfo, progress, ch)
|
||||
}
|
||||
}
|
||||
@ -67,6 +71,10 @@ func (p *IMAPProvider) loadMessageInfoMap(rules transferRules, progress *Progres
|
||||
mailbox, err = p.selectIn(mailboxName)
|
||||
return err
|
||||
})
|
||||
if mailbox == nil {
|
||||
log.WithField("rule", rule.SourceMailbox.Name).Warn("Failed to select into mailbox")
|
||||
continue
|
||||
}
|
||||
if mailbox.Messages == 0 {
|
||||
continue
|
||||
}
|
||||
|
||||
@ -25,6 +25,7 @@ Changelog [format](http://keepachangelog.com/en/1.0.0/)
|
||||
* GODT-951 Properly parse message with long lines in header and long header split to multiple lines (upgrading to latest go-message).
|
||||
* GODT-894 Fix panic when sending while account is logging in.
|
||||
* GODT-831 Fix reporting bug from accounts with empty account name.
|
||||
* GODT-991 Fix panic when stopping import progress during loading mailboxes info.
|
||||
|
||||
### Changed
|
||||
* GODT-97 Don't log errors caused by SELECT "".
|
||||
|
||||
Reference in New Issue
Block a user