an attempt to unlink(2) a directory returns EPERM, not EISDIR. fixes folder

deletion in courier.

from Marc Balmer <marc at msys.ch>
This commit is contained in:
avsm 2004-02-16 17:14:52 +00:00
parent c74694c54e
commit eb493fb118
2 changed files with 15 additions and 2 deletions

View File

@ -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}

View File

@ -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))
{