please excuse me if this problems already been solved - or if im answering the wrong question. i have only read the last two posts to this thread.

my web host provides courier-imap service to me on a openbsd box and recently i decided to take advantage of it. what i found was that i was unable to delete any directories under trash. i brought it up to them and here is what came out of it.

----------------------

Here comes a patch to be included in your Courier IMAP 1.7.2 port. courier-imap cannot delete (empty) folders because it uses unlink() on Maildirs which are not emty (they contain cur/, tmp/ new/). courier-imap checks for a return code EISDIR on unlink and then recurses down to this dir (delsubdir() in maildir/maildirdelfolder.c).

On OpenBSD (3.4-current, at least) unlink returns EPERM, not EISDIR if unlink() is used on a directory.

This small patch changes the folder deletion routine accordingly.

Regards,
Marc

--------------090009000502030601020708
Content-Type: text/plain; name="patch-maildir_maildirdelfolder_c"
Content-Disposition: inline; filename="patch-maildir_maildirdelfolder_c"
Content-Transfer-Encoding: 7bit

--- maildir/maildirdelfolder.c.orig     Mon Jan 26 16:24:17 2004
+++ maildir/maildirdelfolder.c  Mon Jan 26 16:27:25 2004
@@ -60,7 +60,7 @@

strcat(strcat(strcpy(p, s), "/"), de->d_name);

-               if (unlink(p) && errno == EISDIR)
+               if (unlink(p) && errno == EPERM)
                {
                        if (delsubdir(p))
                        {

--------------090009000502030601020708--

hope this helps any.

- Frank

--
[EMAIL PROTECTED] mailing list



Reply via email to