]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-storage: fixup the broken search result with \seen or \delete
authorBaofeng Wang <baofeng.wang@dovecot.fi>
Tue, 26 Apr 2016 08:10:35 +0000 (11:10 +0300)
committerBaofeng Wang <baofeng.wang@dovecot.fi>
Tue, 26 Apr 2016 08:12:57 +0000 (11:12 +0300)
remove side effects of match_always flag during search.

src/lib-storage/index/index-search.c

index d874da6c7822d6f70e4950f2ad8e030ac0df221f..46d0f198579693929c1130a238f0263e8c6c1d3a 100644 (file)
@@ -985,9 +985,6 @@ static bool search_limit_by_hdr(struct index_search_context *ctx,
                                /* UNSEEN with all seen? */
                                if (args->match_not)
                                        return FALSE;
-
-                               /* SEEN with all seen */
-                               args->match_always = TRUE;
                        } else if (args->match_not) {
                                /* UNSEEN with lowwater limiting */
                                search_limit_lowwater(ctx,
@@ -1005,9 +1002,6 @@ static bool search_limit_by_hdr(struct index_search_context *ctx,
                                /* UNDELETED with all deleted? */
                                if (args->match_not)
                                        return FALSE;
-
-                               /* DELETED with all deleted */
-                               args->match_always = TRUE;
                        } else if (!args->match_not) {
                                /* DELETED with lowwater limiting */
                                search_limit_lowwater(ctx,