diff options
author | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-01-25 02:14:51 +0100 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2018-01-25 02:14:51 +0100 |
commit | a863cf8e7e63b40f4cd52909b7b625912d41309c (patch) | |
tree | b7481dead85e36c9b073c4e2fe067b46ac517576 /sys/src/cmd | |
parent | 5054c9795cb02c9b4e05608bbf345790619ed3fa (diff) |
upas/fs: deal with imap returning more uid's than allocated from previus "messages" command
Diffstat (limited to 'sys/src/cmd')
-rw-r--r-- | sys/src/cmd/upas/fs/imap.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/src/cmd/upas/fs/imap.c b/sys/src/cmd/upas/fs/imap.c index 45885d834..f0ac28e23 100644 --- a/sys/src/cmd/upas/fs/imap.c +++ b/sys/src/cmd/upas/fs/imap.c @@ -916,7 +916,11 @@ imap4read(Imap *imap, Mailbox *mb) f = imap->f; n = imap->nuid; - if(n < imap->nmsg) idprint(imap, "partial sync %d < %d\n", n, imap->nmsg); + if(n > imap->muid){ + idprint(imap, "partial sync %d > %d\n", n, imap->muid); + n = imap->nuid = imap->muid; + } else if(n < imap->nmsg) + idprint(imap, "partial sync %d < %d\n", n, imap->nmsg); qsort(f, n, sizeof f[0], (int(*)(void*, void*))fetchicmp); ll = &mb->root->part; for(i = 0; (m = *ll) != nil || i < n; ){ |