From 8189e55776305421ed52186065a9207e72aacb23 Mon Sep 17 00:00:00 2001 From: brad Date: Wed, 2 Jul 2008 23:00:10 +0000 Subject: [PATCH] Maildir: If there are multiple :2, in filename, use the last one both getting and setting the flags. From the Dovecot Mercurial repo. ok sthen@ --- mail/dovecot/Makefile | 4 ++-- ...atch-src_lib-storage_index_maildir_maildir-sync_c | 12 ++++++++++++ 2 files changed, 14 insertions(+), 2 deletions(-) create mode 100644 mail/dovecot/patches/patch-src_lib-storage_index_maildir_maildir-sync_c diff --git a/mail/dovecot/Makefile b/mail/dovecot/Makefile index 8858050e413..3af313db179 100644 --- a/mail/dovecot/Makefile +++ b/mail/dovecot/Makefile @@ -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} diff --git a/mail/dovecot/patches/patch-src_lib-storage_index_maildir_maildir-sync_c b/mail/dovecot/patches/patch-src_lib-storage_index_maildir_maildir-sync_c new file mode 100644 index 00000000000..7ba399a756c --- /dev/null +++ b/mail/dovecot/patches/patch-src_lib-storage_index_maildir_maildir-sync_c @@ -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; +