always list INBOX when asked for it
it's there even if it's not there. says IMAP. no need to contradict.
This commit is contained in:
parent
daaf950878
commit
e7c96f8891
|
@ -202,16 +202,18 @@ maildir_list_recurse( store_t *gctx, int isBox, int *flags, const char *inbox,
|
||||||
char *path, int pathLen, char *name, int nameLen )
|
char *path, int pathLen, char *name, int nameLen )
|
||||||
{
|
{
|
||||||
DIR *dir;
|
DIR *dir;
|
||||||
int pl, nl;
|
int pl, nl, missing;
|
||||||
struct dirent *de;
|
struct dirent *de;
|
||||||
struct stat st;
|
struct stat st;
|
||||||
|
|
||||||
if (isBox) {
|
if (isBox) {
|
||||||
nfsnprintf( path + pathLen, _POSIX_PATH_MAX - pathLen, "/cur" );
|
nfsnprintf( path + pathLen, _POSIX_PATH_MAX - pathLen, "/cur" );
|
||||||
if (stat( path, &st ) || !S_ISDIR(st.st_mode))
|
missing = stat( path, &st ) || !S_ISDIR(st.st_mode);
|
||||||
|
if (!missing || isBox > 1)
|
||||||
|
add_string_list( &gctx->boxes, name );
|
||||||
|
if (missing)
|
||||||
return 0;
|
return 0;
|
||||||
path[pathLen] = 0;
|
path[pathLen] = 0;
|
||||||
add_string_list( &gctx->boxes, name );
|
|
||||||
name[nameLen++] = '/';
|
name[nameLen++] = '/';
|
||||||
}
|
}
|
||||||
if (!(dir = opendir( path ))) {
|
if (!(dir = opendir( path ))) {
|
||||||
|
@ -254,7 +256,7 @@ maildir_list_inbox( store_t *gctx, int *flags )
|
||||||
|
|
||||||
*flags &= ~LIST_INBOX;
|
*flags &= ~LIST_INBOX;
|
||||||
return maildir_list_recurse(
|
return maildir_list_recurse(
|
||||||
gctx, 1, flags, 0,
|
gctx, 2, flags, 0,
|
||||||
path, nfsnprintf( path, _POSIX_PATH_MAX, "%s", ((maildir_store_conf_t *)gctx->conf)->inbox ),
|
path, nfsnprintf( path, _POSIX_PATH_MAX, "%s", ((maildir_store_conf_t *)gctx->conf)->inbox ),
|
||||||
name, nfsnprintf( name, _POSIX_PATH_MAX, "INBOX" ) );
|
name, nfsnprintf( name, _POSIX_PATH_MAX, "INBOX" ) );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user