commit c293acaf240f4d8b85e8309b8eed084058b56631
Author: Oswald Buddenhagen <[email protected]>
Date:   Sun Dec 8 10:44:50 2013 +0100

    fix listing of nested maildir mailboxes

 src/drv_maildir.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/drv_maildir.c b/src/drv_maildir.c
index f5c09ce..aba6e69 100644
--- 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)

------------------------------------------------------------------------------
Sponsored by Intel(R) XDK 
Develop, test and display web and hybrid apps with a single code base.
Download it for free now!
http://pubads.g.doubleclick.net/gampad/clk?id=111408631&iu=/4140/ostg.clktrk
_______________________________________________
isync-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/isync-devel

Reply via email to