aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--worker/imap/connect.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/worker/imap/connect.go b/worker/imap/connect.go
index 01ba7801..c109d3b7 100644
--- a/worker/imap/connect.go
+++ b/worker/imap/connect.go
@@ -101,8 +101,9 @@ func (w *IMAPWorker) connect() (*client.Client, error) {
if err := c.List("", "", info); err != nil {
return nil, fmt.Errorf("failed to retrieve delimiter: %w", err)
}
- mailboxinfo := <-info
- w.delimiter = mailboxinfo.Delimiter
+ if mailboxinfo := <-info; mailboxinfo != nil {
+ w.delimiter = mailboxinfo.Delimiter
+ }
if w.delimiter == "" {
// just in case some implementation does not follow standards
w.delimiter = "/"