fix listing of nested maildir mailboxes
This commit is contained in:
parent
cf0f32f800
commit
c293acaf24
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue
Block a user