aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--camel/ChangeLog9
-rw-r--r--camel/camel-disco-store.c2
-rw-r--r--camel/camel-store.c16
-rw-r--r--camel/camel-store.h6
-rw-r--r--camel/providers/imap/camel-imap-store.c3
5 files changed, 22 insertions, 14 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index 766f33150a..dbe8c038a9 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,5 +1,14 @@
2004-02-04 Not Zed <NotZed@Ximian.com>
+ * camel-store.c (camel_store_sync): added 'expunge' parameter,
+ easier 'empty trash on exit' call.
+
+2004-02-04 Not Zed <NotZed@Ximian.com>
+
+ * providers/imap/camel-imap-store.c
+ (parse_list_response_as_folder_info): if we can't add the folder
+ to the summary {i.e. duplicate}, then ignore it. See #53836.
+
* camel-store.c (camel_store_delete_folder): changed order around,
first try to delete and only remove from the object bag if the
delete worked. If vjunk/vtrash enabled, don't allow those to be
diff --git a/camel/camel-disco-store.c b/camel/camel-disco-store.c
index 7afff575b1..65cbc16194 100644
--- a/camel/camel-disco-store.c
+++ b/camel/camel-disco-store.c
@@ -298,7 +298,7 @@ set_status (CamelDiscoStore *disco_store, CamelDiscoStoreStatus status,
if (disco_store->status == status)
return;
- camel_store_sync (CAMEL_STORE (disco_store), ex);
+ camel_store_sync (CAMEL_STORE (disco_store), FALSE, ex);
if (camel_exception_is_set (ex))
return;
if (!camel_service_disconnect (CAMEL_SERVICE (disco_store), TRUE, ex))
diff --git a/camel/camel-store.c b/camel/camel-store.c
index 677c4a9586..8da93702f8 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -62,7 +62,7 @@ static void delete_folder (CamelStore *store, const char *folder_name,
static void rename_folder (CamelStore *store, const char *old_name,
const char *new_name, CamelException *ex);
-static void store_sync (CamelStore *store, CamelException *ex);
+static void store_sync (CamelStore *store, int expunge, CamelException *ex);
static CamelFolderInfo *get_folder_info (CamelStore *store, const char *top,
guint32 flags, CamelException *ex);
static void free_folder_info (CamelStore *store, CamelFolderInfo *tree);
@@ -635,7 +635,7 @@ camel_store_get_junk (CamelStore *store, CamelException *ex)
}
static void
-store_sync (CamelStore *store, CamelException *ex)
+store_sync (CamelStore *store, int expunge, CamelException *ex)
{
if (store->folders) {
GPtrArray *folders;
@@ -659,23 +659,22 @@ store_sync (CamelStore *store, CamelException *ex)
/**
* camel_store_sync:
* @store: a CamelStore
+ * @expunge: do we expunge deleted messages too?
* @ex: a CamelException
*
* Syncs any changes that have been made to the store object and its
* folders with the real store.
**/
void
-camel_store_sync (CamelStore *store, CamelException *ex)
+camel_store_sync(CamelStore *store, int expunge, CamelException *ex)
{
g_return_if_fail (CAMEL_IS_STORE (store));
- CS_CLASS (store)->sync (store, ex);
+ CS_CLASS(store)->sync(store, expunge, ex);
}
-
static CamelFolderInfo *
-get_folder_info (CamelStore *store, const char *top,
- guint32 flags, CamelException *ex)
+get_folder_info (CamelStore *store, const char *top, guint32 flags, CamelException *ex)
{
w(g_warning ("CamelStore::get_folder_info not implemented for `%s'",
camel_type_to_name (CAMEL_OBJECT_GET_TYPE (store))));
@@ -764,8 +763,7 @@ add_special_info (CamelStore *store, CamelFolderInfo *info, const char *name, co
* camel_store_free_folder_info.
**/
CamelFolderInfo *
-camel_store_get_folder_info (CamelStore *store, const char *top,
- guint32 flags, CamelException *ex)
+camel_store_get_folder_info(CamelStore *store, const char *top, guint32 flags, CamelException *ex)
{
CamelFolderInfo *info;
diff --git a/camel/camel-store.h b/camel/camel-store.h
index cee24887b6..367adc4537 100644
--- a/camel/camel-store.h
+++ b/camel/camel-store.h
@@ -139,8 +139,7 @@ typedef struct {
const char *new_name,
CamelException *ex);
- void (*sync) (CamelStore *store,
- CamelException *ex);
+ void (*sync) (CamelStore *store, int expunge, CamelException *ex);
CamelFolderInfo *(*get_folder_info) (CamelStore *store,
const char *top,
@@ -189,8 +188,7 @@ void camel_store_rename_folder (CamelStore *store,
const char *new_name,
CamelException *ex);
-void camel_store_sync (CamelStore *store,
- CamelException *ex);
+void camel_store_sync (CamelStore *store, int expunge, CamelException *ex);
CamelFolderInfo *camel_store_get_folder_info (CamelStore *store,
const char *top,
diff --git a/camel/providers/imap/camel-imap-store.c b/camel/providers/imap/camel-imap-store.c
index d02ce4117a..a2256e9865 100644
--- a/camel/providers/imap/camel-imap-store.c
+++ b/camel/providers/imap/camel-imap-store.c
@@ -2142,6 +2142,9 @@ parse_list_response_as_folder_info (CamelImapStore *imap_store,
/* FIXME: should use imap_build_folder_info, note the differences with param setting tho */
si = camel_imap_store_summary_add_from_full(imap_store->summary, dir, sep?sep:'/');
+ if (si == NULL)
+ return NULL;
+
newflags = (si->info.flags & CAMEL_STORE_INFO_FOLDER_SUBSCRIBED) | (flags & ~CAMEL_STORE_INFO_FOLDER_SUBSCRIBED);
if (si->info.flags != newflags) {
si->info.flags = newflags;