Explorar el Código

plugins/base: Add missing nil check for getMailboxByType

Fixes panic if there is no usable Sent folder.
master
fox.cpp hace 4 años
committed by Simon Ser
padre
commit
62910a94fb
No se encontró ninguna clave conocida en la base de datos para esta firma ID de clave GPG: FDE7BE0E88F5E48
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. +3
    -0
      plugins/base/imap.go

+ 3
- 0
plugins/base/imap.go Ver fichero

@@ -130,6 +130,9 @@ func getMailboxByType(conn *imapclient.Client, mboxType mailboxType) (*MailboxIn
return nil, fmt.Errorf("failed to get mailbox with attribute %q: %v", attr, err)
}

if best == nil {
return nil, nil
}
return &MailboxInfo{best}, nil
}



Cargando…
Cancelar
Guardar