From 0ad8ef80b28a40c11fb10c37aace0f02e5ec50f6 Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Sun, 8 Dec 2013 10:48:14 +0100 Subject: [PATCH] don't check for INBOX more than necessary --- src/drv_maildir.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/drv_maildir.c b/src/drv_maildir.c index aba6e69..62863cf 100644 --- a/src/drv_maildir.c +++ b/src/drv_maildir.c @@ -228,11 +228,6 @@ maildir_list_recurse( store_t *gctx, int isBox, int *flags, const char *inbox, if (maildir_list_inbox( gctx, flags ) < 0) return -1; } else { - if (!memcmp( ent, "INBOX", 6 )) { - path[pathLen] = 0; - warn( "Maildir warning: ignoring INBOX in %s\n", path ); - continue; - } if (*ent == '.') { if (!isBox) continue; @@ -242,6 +237,11 @@ maildir_list_recurse( store_t *gctx, int isBox, int *flags, const char *inbox, } else { if (isBox) continue; + if (!memcmp( ent, "INBOX", 6 )) { + path[pathLen] = 0; + warn( "Maildir warning: ignoring INBOX in %s\n", path ); + continue; + } } nl = nameLen + nfsnprintf( name + nameLen, _POSIX_PATH_MAX - nameLen, "%s", ent ); if (maildir_list_recurse( gctx, 1, flags, inbox, path, pl, name, nl ) < 0)