isync

mailbox synchronization program
git clone https://git.code.sf.net/p/isync/isync
Log | Files | Refs | README | LICENSE

commit c293acaf240f4d8b85e8309b8eed084058b56631
parent cf0f32f80030e1476bff4fe5ab3c060ef415dafb
Author: Oswald Buddenhagen <ossi@users.sf.net>
Date:   Sun,  8 Dec 2013 10:44:50 +0100

fix listing of nested maildir mailboxes

Diffstat:
Msrc/drv_maildir.c | 5++++-
1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/drv_maildir.c b/src/drv_maildir.c @@ -207,7 +207,8 @@ maildir_list_recurse( store_t *gctx, int isBox, int *flags, const char *inbox, struct stat st; if (isBox) { - nfsnprintf( path + pathLen, _POSIX_PATH_MAX - pathLen, "/cur" ); + path[pathLen++] = '/'; + nfsnprintf( path + pathLen, _POSIX_PATH_MAX - pathLen, "cur" ); missing = stat( path, &st ) || !S_ISDIR(st.st_mode); if (!missing || isBox > 1) add_string_list( &gctx->boxes, name ); @@ -235,6 +236,8 @@ maildir_list_recurse( store_t *gctx, int isBox, int *flags, const char *inbox, if (*ent == '.') { if (!isBox) continue; + if (!ent[1] || ent[1] == '.') + continue; ent++; } else { if (isBox)