diff options
-rw-r--r-- | worker/imap/open.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/worker/imap/open.go b/worker/imap/open.go index 452c309..0602a7f 100644 --- a/worker/imap/open.go +++ b/worker/imap/open.go @@ -40,7 +40,9 @@ func (imapw *IMAPWorker) handleFetchDirectoryContents( }, nil) } else { imapw.worker.Logger.Printf("Found %d UIDs", len(uids)) - imapw.seqMap = make([]uint32, len(uids)) + if len(imapw.seqMap) < len(uids) { + imapw.seqMap = make([]uint32, len(uids)) + } imapw.worker.PostMessage(&types.DirectoryContents{ Message: types.RespondTo(msg), Uids: uids, |