From dd3aa6354c0ad0872568116b88e620cd265d17c8 Mon Sep 17 00:00:00 2001 From: Chenthill Palanisamy Date: Mon, 1 Feb 2010 21:23:05 +0530 Subject: [PATCH] create the trash folder --- camel/providers/imapx/camel-imapx-store.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/camel/providers/imapx/camel-imapx-store.c b/camel/providers/imapx/camel-imapx-store.c index 7ded0bc..6ce1368 100644 --- a/camel/providers/imapx/camel-imapx-store.c +++ b/camel/providers/imapx/camel-imapx-store.c @@ -205,9 +205,19 @@ imap_disconnect (CamelService *service, gboolean clean, CamelException *ex) static CamelFolder * imap_get_trash (CamelStore *store, CamelException *ex) -{ - /* no-op */ - return NULL; +{ + CamelFolder *folder = CAMEL_STORE_CLASS(parent_class)->get_trash(store, ex); + + if (folder) { + gchar *state = g_build_filename(((CamelIMAPXStore *)store)->storage_path, "system", "Trash.cmeta", NULL); + + camel_object_set(folder, NULL, CAMEL_OBJECT_STATE_FILE, state, NULL); + g_free(state); + /* no defaults? */ + camel_object_state_read(folder); + } + + return folder; } static CamelFolder * -- 2.7.4