]> mj.ucw.cz Git - checkmail.git/commitdiff
Dots at the start of mailbox name are ignored
authorMartin Mares <mj@ucw.cz>
Sat, 3 Mar 2018 09:46:11 +0000 (10:46 +0100)
committerMartin Mares <mj@ucw.cz>
Sat, 3 Mar 2018 09:46:11 +0000 (10:46 +0100)
This is useful for Maildir sub-folders in default config of Dovecot.

cm.c

diff --git a/cm.c b/cm.c
index aa300f6f1b2e5d11cb5b7037c48e60f051f998ec..987265a245c18969ae2f4b3411f052d56062eff9 100644 (file)
--- 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 *