aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/folder-browser.c24
-rw-r--r--mail/mail-ops.c11
-rw-r--r--mail/message-list.c23
4 files changed, 17 insertions, 51 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 8153d6dd35..52cbfb239e 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,13 @@
+2000-06-06 Dan Winship <danw@helixcode.com>
+
+ * mail-ops.c (fetch_mail):
+ * folder-browser.c (folder_browser_load_folder): Update for folder
+ creation/existence changes.
+
+ * message-list.c (message_list_set_folder): Remove the code to
+ create the folder if it doesn't exist, since we don't want to do
+ that.
+
2000-06-05 Dan Winship <danw@helixcode.com>
* mail-ops.c (composer_send_cb): Leave the composer window around
diff --git a/mail/folder-browser.c b/mail/folder-browser.c
index 90f393b731..da8184993c 100644
--- a/mail/folder-browser.c
+++ b/mail/folder-browser.c
@@ -69,7 +69,6 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
CamelStore *store;
CamelFolder *new_folder = NULL;
CamelException *ex;
- gboolean new_folder_exists = FALSE;
ex = camel_exception_new ();
@@ -86,7 +85,7 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
store = camel_session_get_store (session, store_name, ex);
if (store) {
- new_folder = camel_store_get_folder (store, newquery, ex);
+ new_folder = camel_store_get_folder (store, newquery, TRUE, ex);
/* FIXME: do this properly rather than hardcoding */
#warning "Find a way not to hardcode vfolder source"
{
@@ -99,7 +98,7 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
st = camel_session_get_store (session, stname, ex);
g_free (stname);
if (st) {
- source_folder = camel_store_get_folder (st, "mbox", ex);
+ source_folder = camel_store_get_folder (st, "mbox", FALSE, ex);
if (source_folder) {
camel_vee_folder_add_folder(new_folder, source_folder);
}
@@ -115,7 +114,7 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
store = camel_session_get_store (session, store_name, ex);
g_free (store_name);
if (store) {
- new_folder = camel_store_get_folder (store, "mbox", ex);
+ new_folder = camel_store_get_folder (store, "mbox", FALSE, ex);
}
} else {
char *msg;
@@ -140,23 +139,6 @@ folder_browser_load_folder (FolderBrowser *fb, const char *name)
return FALSE;
}
- /* If the folder does not exist, we don't want to show it */
- new_folder_exists = camel_folder_exists (new_folder, ex);
- if (camel_exception_get_id (ex)) {
- msg = g_strdup_printf ("Unable to test if folder %s "
- "exists: %s\n", name,
- camel_exception_get_description (ex));
- gnome_error_dialog (msg);
- camel_exception_free (ex);
- return FALSE;
- }
- camel_exception_free (ex);
-
- if (!new_folder_exists) {
- gtk_object_unref (GTK_OBJECT (new_folder));
- return FALSE;
- }
-
if (fb->folder)
gtk_object_unref (GTK_OBJECT (fb->folder));
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 0d742bea1f..9a41b9d02e 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -144,7 +144,7 @@ fetch_mail (GtkWidget *button, gpointer user_data)
folder = camel_store_get_folder (fb->folder->parent_store,
strrchr (tmp_mbox, '/') + 1,
- ex);
+ FALSE, ex);
camel_folder_open (folder, FOLDER_OPEN_READ, ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
@@ -166,7 +166,8 @@ fetch_mail (GtkWidget *button, gpointer user_data)
goto cleanup;
}
- sourcefolder = camel_store_get_folder (store, "inbox", ex);
+ sourcefolder = camel_store_get_folder (store, "inbox",
+ FALSE, ex);
camel_folder_open (sourcefolder, FOLDER_OPEN_READ, ex);
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
mail_exception_dialog ("Unable to get new mail", ex, fb);
@@ -183,11 +184,7 @@ fetch_mail (GtkWidget *button, gpointer user_data)
folder = camel_store_get_folder (fb->folder->parent_store,
strrchr (tmp_mbox, '/') + 1,
- ex);
-
- if (!camel_folder_exists(folder, ex)) {
- camel_folder_create(folder, ex);
- }
+ TRUE, ex);
camel_folder_open(folder, FOLDER_OPEN_RW, ex);
diff --git a/mail/message-list.c b/mail/message-list.c
index 6bede24743..957d320fba 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -878,29 +878,6 @@ message_list_set_folder (MessageList *message_list, CamelFolder *camel_folder)
message_list->folder = camel_folder;
- folder_exists = camel_folder_exists (camel_folder, NULL);
-
- if (camel_exception_get_id (&ex)) {
- printf ("Unable to test for folder existence: %s\n",
- ex.desc?ex.desc:"unknown reason");
- return;
- }
-
- if (!folder_exists) {
- g_warning ("Folder does not exist, creating it\n");
- /*
- if you don't want the directory to be created
- automatically here remove this.
- */
- camel_folder_create (camel_folder, &ex);
- if (camel_exception_get_id (&ex)) {
- printf ("Unable to create folder: %s\n",
- ex.desc?ex.desc:"unknown_reason");
- return;
- }
-
- }
-
camel_folder_open (camel_folder, FOLDER_OPEN_RW, &ex);
if (camel_exception_get_id (&ex)) {
printf ("Unable to open folder: %s\n",