# HG changeset patch # User Timo Sirainen # Date 1190467449 -10800 # Node ID 90faec88598ff110fd89ded1828e6ef368b2661c # Parent aeee5076f99f6950840b2948d7b093a0efb372df Synchronize mailbox after it has been opened. diff -r aeee5076f99f -r 90faec88598f src/plugins/quota/quota-count.c --- a/src/plugins/quota/quota-count.c Sat Sep 22 16:21:20 2007 +0300 +++ b/src/plugins/quota/quota-count.c Sat Sep 22 16:24:09 2007 +0300 @@ -22,6 +22,11 @@ if (box == NULL) return -1; + if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FULL_READ, 0, NULL) < 0) { + mailbox_close(&box); + return -1; + } + memset(&search_arg, 0, sizeof(search_arg)); search_arg.type = SEARCH_ALL; diff -r aeee5076f99f -r 90faec88598f src/plugins/quota/quota-storage.c --- a/src/plugins/quota/quota-storage.c Sat Sep 22 16:21:20 2007 +0300 +++ b/src/plugins/quota/quota-storage.c Sat Sep 22 16:24:09 2007 +0300 @@ -403,6 +403,11 @@ if (box == NULL) return -1; + if (mailbox_sync(box, MAILBOX_SYNC_FLAG_FULL_READ, 0, NULL) < 0) { + mailbox_close(&box); + return -1; + } + memset(&search_arg, 0, sizeof(search_arg)); search_arg.type = SEARCH_ALL;