aboutsummaryrefslogtreecommitdiffstats
path: root/camel/providers/imap
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2002-08-21 03:23:15 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2002-08-21 03:23:15 +0800
commit2be7ab21f64752eda4cc6558bd9116d5d1a58474 (patch)
tree4cbcbe0ed56de192c70a29358be8abae55a228a7 /camel/providers/imap
parent32ea180585e000d7cde34eaabc7a1736f7267337 (diff)
downloadgsoc2013-evolution-2be7ab21f64752eda4cc6558bd9116d5d1a58474.tar
gsoc2013-evolution-2be7ab21f64752eda4cc6558bd9116d5d1a58474.tar.gz
gsoc2013-evolution-2be7ab21f64752eda4cc6558bd9116d5d1a58474.tar.bz2
gsoc2013-evolution-2be7ab21f64752eda4cc6558bd9116d5d1a58474.tar.lz
gsoc2013-evolution-2be7ab21f64752eda4cc6558bd9116d5d1a58474.tar.xz
gsoc2013-evolution-2be7ab21f64752eda4cc6558bd9116d5d1a58474.tar.zst
gsoc2013-evolution-2be7ab21f64752eda4cc6558bd9116d5d1a58474.zip
Don't let the minimum recursive depth be negative. (get_folders): Pass
2002-08-20 Jeffrey Stedfast <fejj@ximian.com> * providers/imap/camel-imap-store.c (get_folders): Don't let the minimum recursive depth be negative. (get_folders): Pass flags & CAMEL_FOLDER_INFO_SUBSCRIBED as the `lsub' argument to get_folders_online() otherwise we'll end up doing a LIST when we really wanted to do an LSUB. svn path=/trunk/; revision=17819
Diffstat (limited to 'camel/providers/imap')
-rw-r--r--camel/providers/imap/camel-imap-store.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index 24f46f0d09..f54b129e27 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -2129,8 +2129,8 @@ get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *e
if (imap_max_depth == 0) {
name = getenv("CAMEL_IMAP_MAX_DEPTH");
if (name) {
- imap_max_depth = atoi(name);
- imap_max_depth = MIN(imap_max_depth, 2);
+ imap_max_depth = atoi (name);
+ imap_max_depth = MIN (MAX (imap_max_depth, 0), 2);
} else
imap_max_depth = 10;
}
@@ -2150,16 +2150,16 @@ get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *e
folders_out = g_ptr_array_new();
folders = g_ptr_array_new();
-
+
/* first get working list of names */
- get_folders_online (imap_store, name[0]?name:"%", folders, FALSE, ex);
+ get_folders_online (imap_store, name[0]?name:"%", folders, flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
for (i=0; i<folders->len && !haveinbox; i++) {
fi = folders->pdata[i];
haveinbox = (strcasecmp(fi->full_name, "INBOX")) == 0;
}
if (!haveinbox && top == imap_store->namespace)
- get_folders_online(imap_store, "INBOX", folders, FALSE, ex);
+ get_folders_online(imap_store, "INBOX", folders, flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
for (i=0; i<folders->len; i++)
p = g_slist_prepend(p, folders->pdata[i]);
@@ -2192,7 +2192,7 @@ get_folders(CamelStore *store, const char *top, guint32 flags, CamelException *e
char *n;
n = imap_concat(imap_store, fi->full_name, "%");
- get_folders_online(imap_store, n, folders, FALSE, ex);
+ get_folders_online(imap_store, n, folders, flags & CAMEL_STORE_FOLDER_INFO_SUBSCRIBED, ex);
g_free(n);
if (folders->len > 0)