]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
Maildir: If there are multiple :2,<flags> in filename, use the last one both
authorTimo Sirainen <tss@iki.fi>
Tue, 1 Jul 2008 20:33:17 +0000 (23:33 +0300)
committerTimo Sirainen <tss@iki.fi>
Tue, 1 Jul 2008 20:33:17 +0000 (23:33 +0300)
getting and setting the flags.

--HG--
branch : HEAD

src/lib-storage/index/maildir/maildir-filename.c

index 635aa6b2a029b51286863342a13dd0cceeaa22ca..077ae858cc0eea0e495e6f50c714db506602a75c 100644 (file)
@@ -44,7 +44,7 @@ void maildir_filename_get_flags(struct maildir_keywords_sync_ctx *ctx,
        array_clear(keywords_r);
        *flags_r = 0;
 
-       info = strchr(fname, MAILDIR_INFO_SEP);
+       info = strrchr(fname, MAILDIR_INFO_SEP);
        if (info == NULL || info[1] != '2' || info[2] != MAILDIR_FLAGS_SEP)
                return;