Bug 611879 - IMAPX : 'copy folder content locally for offline' doesn't get remembered
authorChenthill Palanisamy <pchenthill@novell.com>
Thu, 11 Mar 2010 11:43:47 +0000 (17:13 +0530)
committerChenthill Palanisamy <pchenthill@novell.com>
Thu, 11 Mar 2010 11:43:47 +0000 (17:13 +0530)
camel/providers/imapx/camel-imapx-folder.c

index ad24664..00fc6f3 100644 (file)
@@ -62,7 +62,7 @@ camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *
        CamelFolder *folder;
        CamelIMAPXFolder *ifolder;
        const gchar *short_name;
-       gchar *summary_file;
+       gchar *summary_file, *state_file;
        CamelIMAPXStore *istore;
 
        d(printf("opening imap folder '%s'\n", folder_dir));
@@ -96,6 +96,11 @@ camel_imapx_folder_new(CamelStore *store, const gchar *folder_dir, const gchar *
                return NULL;
        }
 
+       state_file = g_strdup_printf ("%s/cmeta", folder_dir);
+       camel_object_set(folder, NULL, CAMEL_OBJECT_STATE_FILE, state_file, NULL);
+       g_free(state_file);
+       camel_object_state_read(folder);
+
        ifolder->search = camel_folder_search_new ();
        ifolder->search_lock = g_mutex_new ();
        ifolder->ignore_recent = g_hash_table_new_full (g_str_hash, g_str_equal, (GDestroyNotify) g_free, NULL);