From 532bf55fb072cd749e4b72ad622dcaee9156095d Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Tue, 10 Mar 2009 11:22:26 -0400 Subject: [PATCH] dbox: When doing a cleanup, need to refresh map index after locking. --HG-- branch : HEAD --- src/lib-storage/index/dbox/dbox-map.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/lib-storage/index/dbox/dbox-map.c b/src/lib-storage/index/dbox/dbox-map.c index 7fee455290..fb539bd59b 100644 --- a/src/lib-storage/index/dbox/dbox-map.c +++ b/src/lib-storage/index/dbox/dbox-map.c @@ -324,6 +324,11 @@ int dbox_map_remove_file_id(struct dbox_map *map, uint32_t file_id) uint32_t log_seq; uoff_t log_offset; + /* make sure the map is refreshed, otherwise we might be expunging + messages that have already been moved to other files. */ + if (dbox_map_refresh(map) < 0) + return -1; + trans = mail_index_transaction_begin(map->view, MAIL_INDEX_TRANSACTION_FLAG_EXTERNAL); hdr = mail_index_get_header(map->view); -- 2.47.3