commit 8c781d4fb55f1dae47dab0388e7e3d40170b7d21 Author: Oswald Buddenhagen <o...@users.sf.net> Date: Wed Aug 21 11:13:40 2024 +0200
fix implicit listing of Maildir INBOX under Path commit acd6b4b0 ("simplify/fix recursive maildir listing") argued that listing INBOX when it is encountered while listing Path would be unnecessary, as the caller would list it separately anyway if requested. however, it is actually documented that Patterns will implicitly match INBOX nested into Path. so revert that commit. REFMAIL: 20240818002409.4c918eb4@inari src/drv_maildir.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/drv_maildir.c b/src/drv_maildir.c index d15cf46..fe0e951 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -372,6 +372,8 @@ maildir_list_maildirpp( maildir_store_t *ctx, int flags, const char *inbox ) return 0; } +static int maildir_list_inbox( maildir_store_t *ctx ); + static int maildir_list_recurse( maildir_store_t *ctx, int isBox, const char *inbox, uint inboxLen, @@ -422,6 +424,10 @@ maildir_list_recurse( maildir_store_t *ctx, int isBox, pl += pathLen; if (inbox && equals( path, pl, inbox, inboxLen )) { // Inbox nested into Path. + if (maildir_list_inbox( ctx ) < 0) { + closedir( dir ); + return -1; + } } else { if (style == SUB_LEGACY) { if (*ent == '.') { _______________________________________________ isync-devel mailing list isync-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/isync-devel