From: Martin Mares Date: Sat, 3 Mar 2018 09:46:11 +0000 (+0100) Subject: Dots at the start of mailbox name are ignored X-Git-Tag: v1.11~3 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=48bb6ca8083737f5bbb14bbd5070b65bbd1b55c9;p=checkmail.git Dots at the start of mailbox name are ignored This is useful for Maildir sub-folders in default config of Dovecot. --- diff --git a/cm.c b/cm.c index aa300f6..987265a 100644 --- a/cm.c +++ b/cm.c @@ -202,7 +202,13 @@ static char * mbox_name(char *path) { char *c = strrchr(path, '/'); - return c ? (c+1) : path; + if (c) + c++; + else + c = path; + if (*c == '.') + c++; + return c; } static struct mbox *