fix exclusion of bogus "INBOX.*" folders in Maildir++
this also adds code which avoids that the message about excluding the
mailbox is printed multiple times - this could happen with Maildir++, as
the hierarchy is flattened.
amends 0f24ca31b
.
This commit is contained in:
parent
2d1cfc2c7f
commit
9eaa97923a
|
@ -303,6 +303,7 @@ maildir_list_recurse( store_t *gctx, int isBox, int flags,
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
int style = ((maildir_store_conf_t *)gctx->conf)->sub_style;
|
int style = ((maildir_store_conf_t *)gctx->conf)->sub_style;
|
||||||
int pl, nl, i;
|
int pl, nl, i;
|
||||||
|
int warned = 0;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
|
@ -370,9 +371,12 @@ maildir_list_recurse( store_t *gctx, int isBox, int flags,
|
||||||
name[i] = '/';
|
name[i] = '/';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (nameLen == nameOff && equals( effName, nl - nameOff, "INBOX", 5 ) && (!effName[5] || effName[5] == '/')) {
|
if (nameLen == nameOff && starts_with( effName, nl - nameOff, "INBOX", 5 ) && (!effName[5] || effName[5] == '/')) {
|
||||||
|
if (!warned) {
|
||||||
|
warned = 1;
|
||||||
path[pathLen] = 0;
|
path[pathLen] = 0;
|
||||||
warn( "Maildir warning: ignoring INBOX in %s\n", path );
|
warn( "Maildir warning: ignoring INBOX in %s\n", path );
|
||||||
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
path[pl++] = '/';
|
path[pl++] = '/';
|
||||||
|
|
Loading…
Reference in New Issue
Block a user