aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog10
-rw-r--r--camel/providers/imap/camel-imap-store.c22
2 files changed, 31 insertions, 1 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 16231a16b4..2e891859c7 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,15 @@
2002-08-09 Peter Williams <peterw@ximian.com>
+ * providers/imap/camel-imap-store.c
+ (get_folder_info_online): Tweak how we build the tree based on whether
+ a full tree or a subtree is being requested. Fixes subscribe dialog
+ on UW servers.
+ (get_one_folder_offline): Don't add folders that we're not subscribed
+ to; fixes UW folders that weren't being marked as NoSelect because
+ the storeinfo doesn't record that information.
+
+2002-08-09 Peter Williams <peterw@ximian.com>
+
* providers/imap/camel-imap-folder.c (imap_rename): When renaming our
cache, add the "/folders" to the path.
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index aa423dc711..7373df146b 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -2098,7 +2098,18 @@ get_folder_info_online (CamelStore *store, const char *top,
}
/* Assemble. */
- tree = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE);
+
+ /* if building the folder tree, preserve the namespace at the top. Note the
+ * ==, not strcmp. This makes it so that the subscribe dialog and the folder
+ * tree have the same layout and prevents the subscribe dialog from building
+ * infinitely large trees.
+ */
+
+ if (name == imap_store->namespace)
+ tree = camel_folder_info_build (folders, "", imap_store->dir_sep, TRUE);
+ else
+ tree = camel_folder_info_build (folders, name, imap_store->dir_sep, TRUE);
+
if (flags & CAMEL_STORE_FOLDER_INFO_FAST) {
g_ptr_array_free (folders, TRUE);
return tree;
@@ -2167,6 +2178,15 @@ get_one_folder_offline (const char *physical_path, const char *path, gpointer da
if (*path != '/')
return TRUE;
+ /* folder_info_build will insert parent nodes as necessary and mark
+ * them as noselect, which is information we actually don't have at
+ * the moment. So let it do the right thing by bailing out if it's
+ * not a folder we're explicitly interested in.
+ */
+
+ if (g_hash_table_lookup (imap_store->subscribed_folders, path + 1) == 0)
+ return TRUE;
+
fi = g_new0 (CamelFolderInfo, 1);
fi->full_name = g_strdup (path+1);
fi->name = strrchr (fi->full_name, imap_store->dir_sep);