2007-01-16 [colin] 2.7.1cvs5
authorColin Leroy <colin@colino.net>
Tue, 16 Jan 2007 07:25:11 +0000 (07:25 +0000)
committerColin Leroy <colin@colino.net>
Tue, 16 Jan 2007 07:25:11 +0000 (07:25 +0000)
* src/imap.c
Never remove INBOX when scanning for
new folders. It's a special folder
that has to exist.

ChangeLog
PATCHSETS
configure.ac
src/imap.c

index 51d6cbad0cc883ddefc71ffacc6226314c5fe2e6..17b9c6aef43191d172306e646a35a0dfa4c5fdc0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-01-16 [colin]     2.7.1cvs5
+
+       * src/imap.c
+               Never remove INBOX when scanning for
+               new folders. It's a special folder
+               that has to exist.
+
 2007-01-15 [colin]     2.7.1cvs4
 
        * src/imap.c
index c5ab83eaadc56ce28be4156ff5d8923c254e18cc..856c287ea2e20020fed9a6add2c7da6053aab133 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.16.2.9 -r 1.16.2.10 src/matcher_parser_lex.l;  cvs diff -u -r 1.8.2.6 -r 1.8.2.7 src/quote_fmt_lex.l;  cvs diff -u -r 1.25.2.19 -r 1.25.2.20 src/matcher_parser_parse.y;  ) > 2.7.1cvs2.patchset
 ( cvs diff -u -r 1.1.4.68 -r 1.1.4.69 src/etpan/imap-thread.c;  ) > 2.7.1cvs3.patchset
 ( cvs diff -u -r 1.179.2.148 -r 1.179.2.149 src/imap.c;  cvs diff -u -r 1.1.4.69 -r 1.1.4.70 src/etpan/imap-thread.c;  ) > 2.7.1cvs4.patchset
+( cvs diff -u -r 1.179.2.149 -r 1.179.2.150 src/imap.c;  ) > 2.7.1cvs5.patchset
index 01cbc7bf55a607f9eb79ec62891002449326aeb4..1a80523b4f87d46aca7316a9789668b253ac80c0 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=7
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=4
+EXTRA_VERSION=5
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a7901272ec055d26cefaee14b7008d3b48d61c1e..7f76e8553a3a70652004b9245ce2fe98e0d77034 100644 (file)
@@ -1549,9 +1549,11 @@ static gint imap_scan_tree(Folder *folder)
 
        if (folder->node)
                item = FOLDER_ITEM(folder->node->data);
+               
        if (item && !item->path && root_folder) {
                item->path = g_strdup(root_folder);
        }
+
        if (!item || ((item->path || root_folder) &&
                      strcmp2(item->path, root_folder) != 0)) {
                folder_tree_destroy(folder);
@@ -1633,9 +1635,13 @@ static gint imap_scan_tree_recursive(IMAPSession *session, FolderItem *item)
                        }
                }
                if (!new_item) {
-                       debug_print("folder '%s' not found. removing...\n",
-                                   old_item->path);
-                       folder_item_remove(old_item);
+                       if (old_item && old_item->path && !strcmp(old_item->path, "INBOX")) {
+                               debug_print("not removing INBOX\n");
+                       } else {
+                               debug_print("folder '%s' not found. removing...\n",
+                                           old_item->path);
+                               folder_item_remove(old_item);
+                       }
                } else {
                        old_item->no_sub = new_item->no_sub;
                        old_item->no_select = new_item->no_select;