diff options
Diffstat (limited to 'libproto/imap')
-rw-r--r-- | libproto/imap/folder.c | 4 | ||||
-rw-r--r-- | libproto/imap/genlist.c | 12 | ||||
-rw-r--r-- | libproto/imap/tests/imapfolder.c | 2 |
3 files changed, 9 insertions, 9 deletions
diff --git a/libproto/imap/folder.c b/libproto/imap/folder.c index 5e4331292..9e23847b8 100644 --- a/libproto/imap/folder.c +++ b/libproto/imap/folder.c @@ -272,7 +272,7 @@ _mu_imap_folder_list (mu_folder_t folder, struct mu_folder_scanner *scn) if (rc) return rc; - if (scn->max_level + if (scn->max_depth || (scn->match_flags & MU_FOLDER_ATTRIBUTE_ALL) != MU_FOLDER_ATTRIBUTE_ALL) { /* Filter out the list, eliminating non-matching entries */ @@ -292,7 +292,7 @@ _mu_imap_folder_list (mu_folder_t folder, struct mu_folder_scanner *scn) mu_iterator_current (itr, (void**) &rp); if (!(rp->type & scn->match_flags) - || (scn->max_level && rp->level > scn->max_level)) + || (scn->max_depth && rp->depth > scn->max_depth)) mu_iterator_ctl (itr, mu_itrctl_delete, NULL); } mu_iterator_destroy (&itr); diff --git a/libproto/imap/genlist.c b/libproto/imap/genlist.c index 1e2de88d8..13352b6bb 100644 --- a/libproto/imap/genlist.c +++ b/libproto/imap/genlist.c @@ -37,14 +37,14 @@ struct list_closure }; static int -count_level (const char *name, int delim) +count_depth (const char *name, int delim) { - int level = 0; + int depth = 0; while (*name) if (*name++ == delim) - level++; - return level; + depth++; + return depth; } static int @@ -109,14 +109,14 @@ list_untagged_handler (mu_imap_t imap, mu_list_t resp, void *data) if (_mu_imap_list_element_is_nil (elt)) { rp->separator = 0; - rp->level = 0; + rp->depth = 0; } else if (elt->type != imap_eltype_string) return; else { rp->separator = elt->v.string[0]; - rp->level = count_level (rp->name, rp->separator); + rp->depth = count_depth (rp->name, rp->separator); } if ((clos->error_code = mu_list_append (clos->retlist, rp))) mu_list_response_free (rp); diff --git a/libproto/imap/tests/imapfolder.c b/libproto/imap/tests/imapfolder.c index 8d3f6ce44..2de850622 100644 --- a/libproto/imap/tests/imapfolder.c +++ b/libproto/imap/tests/imapfolder.c @@ -37,7 +37,7 @@ _print_list_entry (void *item, void *data) (resp->type & MU_FOLDER_ATTRIBUTE_DIRECTORY) ? 'd' : '-', (resp->type & MU_FOLDER_ATTRIBUTE_FILE) ? 'f' : '-', resp->separator ? resp->separator : ' ', - resp->level, + resp->depth, resp->name); return 0; } |