Maildir: If there are multiple :2,<flags> in filename, use the last one

both getting and setting the flags.

From the Dovecot Mercurial repo.

ok sthen@
This commit is contained in:
brad 2008-07-02 23:00:10 +00:00
parent 8c3eba838e
commit 8189e55776
2 changed files with 14 additions and 2 deletions

View File

@ -1,4 +1,4 @@
# $OpenBSD: Makefile,v 1.99 2008/06/22 18:36:46 brad Exp $
# $OpenBSD: Makefile,v 1.100 2008/07/02 23:00:10 brad Exp $
SHARED_ONLY= Yes
@ -10,7 +10,7 @@ V_DOVECOT= 1.0.15
V_SIEVE= 1.0.3
PKGNAME= dovecot-${V_DOVECOT}
PKGNAME-server= dovecot-${V_DOVECOT}
PKGNAME-server= dovecot-${V_DOVECOT}p0
PKGNAME-sieve= dovecot-sieve-${V_SIEVE}
DISTNAME= dovecot-${V_DOVECOT}

View File

@ -0,0 +1,12 @@
$OpenBSD: patch-src_lib-storage_index_maildir_maildir-sync_c,v 1.1 2008/07/02 23:00:10 brad Exp $
--- src/lib-storage/index/maildir/maildir-sync.c.orig Wed Jul 2 13:59:08 2008
+++ src/lib-storage/index/maildir/maildir-sync.c Wed Jul 2 13:59:45 2008
@@ -257,7 +257,7 @@ int maildir_filename_get_flags(struct maildir_keywords
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 0;