From eb493fb1181c952b22506847100bf0cf1d9b793e Mon Sep 17 00:00:00 2001 From: avsm Date: Mon, 16 Feb 2004 17:14:52 +0000 Subject: [PATCH] an attempt to unlink(2) a directory returns EPERM, not EISDIR. fixes folder deletion in courier. from Marc Balmer --- mail/courier-imap/Makefile | 5 +++-- .../patches/patch-maildir_maildirdelfolder_c | 12 ++++++++++++ 2 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 mail/courier-imap/patches/patch-maildir_maildirdelfolder_c diff --git a/mail/courier-imap/Makefile b/mail/courier-imap/Makefile index fc9b9037b44..c7bddff212b 100644 --- a/mail/courier-imap/Makefile +++ b/mail/courier-imap/Makefile @@ -1,4 +1,4 @@ -# $OpenBSD: Makefile,v 1.36 2004/01/02 05:11:08 brad Exp $ +# $OpenBSD: Makefile,v 1.37 2004/02/16 17:14:52 avsm Exp $ COMMENT= "imap server for maildir format mailboxes" COMMENT-pop3= "pop3 server for maildir format mailboxes" @@ -8,7 +8,8 @@ COMMENT-pgsql= "pgsql authentication module for courier-imap" COURIERVER= 1.7.2 DISTNAME= courier-imap-${COURIERVER} -FULLPKGNAME-pop3= courier-pop3-${COURIERVER} +FULLPKGNAME= courier-imap-${COURIERVER}p0 +FULLPKGNAME-pop3= courier-pop3-${COURIERVER}p0 FULLPKGNAME-ldap= courier-ldap-${COURIERVER} FULLPKGNAME-mysql= courier-mysql-${COURIERVER} FULLPKGNAME-pgsql= courier-pgsql-${COURIERVER} diff --git a/mail/courier-imap/patches/patch-maildir_maildirdelfolder_c b/mail/courier-imap/patches/patch-maildir_maildirdelfolder_c new file mode 100644 index 00000000000..30e0f7984cd --- /dev/null +++ b/mail/courier-imap/patches/patch-maildir_maildirdelfolder_c @@ -0,0 +1,12 @@ +$OpenBSD: patch-maildir_maildirdelfolder_c,v 1.1 2004/02/16 17:14:52 avsm Exp $ +--- maildir/maildirdelfolder.c.orig 2004-02-16 17:04:11.000000000 +0000 ++++ maildir/maildirdelfolder.c 2004-02-16 17:04:20.000000000 +0000 +@@ -60,7 +60,7 @@ char *p; + + strcat(strcat(strcpy(p, s), "/"), de->d_name); + +- if (unlink(p) && errno == EISDIR) ++ if (unlink(p) && errno == EPERM) + { + if (delsubdir(p)) + {