(camel_imap_folder_new): Move the summary creation to after the
authorDan Winship <danw@src.gnome.org>
Wed, 18 Oct 2000 03:41:29 +0000 (03:41 +0000)
committerDan Winship <danw@src.gnome.org>
Wed, 18 Oct 2000 03:41:29 +0000 (03:41 +0000)
folder selection again, since it depends on the uidvalidity
having been set.

camel/ChangeLog
camel/providers/imap/camel-imap-folder.c

index 9a96178..df45061 100644 (file)
@@ -3,6 +3,9 @@
        * providers/imap/camel-imap-folder.c (imap_refresh_info): Remove
        cached info at the end of the summary when the folder shrinks
        between sessions. Also remove an untrue comment.
+       (camel_imap_folder_new): Move the summary creation to after the
+       folder selection again, since it depends on the uidvalidity
+       having been set.
 
        * providers/imap/camel-imap-store.c (get_folder): Fix up
        summary_file to not include the namespace twice.
index 16533db..38dd495 100644 (file)
@@ -187,15 +187,6 @@ camel_imap_folder_new (CamelStore *parent, const char *folder_name,
                short_name = folder_name;
        camel_folder_construct (folder, parent, folder_name, short_name);
 
-       imap_folder->summary = camel_imap_summary_new (summary_file, validity);
-       if (!imap_folder->summary) {
-               camel_object_unref (CAMEL_OBJECT (folder));
-               camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
-                                     "Could not load summary for %s",
-                                     folder_name);
-               return NULL;
-       }
-
        response = camel_imap_command (imap_store, folder, ex, NULL);
        if (!response) {
                camel_object_unref ((CamelObject *)folder);
@@ -221,6 +212,15 @@ camel_imap_folder_new (CamelStore *parent, const char *folder_name,
        }
        camel_imap_response_free (response);
 
+       imap_folder->summary = camel_imap_summary_new (summary_file, validity);
+       if (!imap_folder->summary) {
+               camel_object_unref (CAMEL_OBJECT (folder));
+               camel_exception_setv (ex, CAMEL_EXCEPTION_SYSTEM,
+                                     "Could not load summary for %s",
+                                     folder_name);
+               return NULL;
+       }
+
        imap_refresh_info (folder, ex);
        if (camel_exception_is_set (ex)) {
                camel_object_unref (CAMEL_OBJECT (folder));