comparison src/lib-storage/index/maildir/maildir-sync.c @ 3821:c8b2ed2c9961 HEAD

We assumed that keyword index arrays were always sorted. This isn't always the case. Caused unneeded keyword updates.
author Timo Sirainen <tss@iki.fi>
date Fri, 06 Jan 2006 16:50:34 +0200
parents 0cae3268c8af
children 55df57c028d4
comparison
equal deleted inserted replaced
3820:ec0119de5aa2 3821:c8b2ed2c9961
1042 mail_index_update_flags(trans, seq, MODIFY_REMOVE, 1042 mail_index_update_flags(trans, seq, MODIFY_REMOVE,
1043 MAIL_RECENT); 1043 MAIL_RECENT);
1044 } 1044 }
1045 1045
1046 /* update keywords if they have changed */ 1046 /* update keywords if they have changed */
1047 array_clear(&idx_keywords);
1048 if (mail_index_lookup_keywords(view, seq, &idx_keywords) < 0) { 1047 if (mail_index_lookup_keywords(view, seq, &idx_keywords) < 0) {
1049 ret = -1; 1048 ret = -1;
1050 break; 1049 break;
1051 } 1050 }
1052 if (!array_cmp(&keywords, &idx_keywords)) { 1051 if (!index_keyword_array_cmp(&keywords, &idx_keywords)) {
1053 struct mail_keywords *kw; 1052 struct mail_keywords *kw;
1054 1053
1055 kw = mail_index_keywords_create_from_indexes( 1054 kw = mail_index_keywords_create_from_indexes(
1056 trans, &keywords); 1055 trans, &keywords);
1057 mail_index_update_keywords(trans, seq, 1056 mail_index_update_keywords(trans, seq,