* Changed the folder type detection in the folder rules
pmo-trunk-r2249
g_object_unref (G_OBJECT(account));
/* Neither INBOX not ROOT folders should me moveable */
- folder_type = tny_folder_get_folder_type (folder);
+ folder_type = modest_tny_folder_guess_folder_type (folder);
if ((folder_type == TNY_FOLDER_TYPE_INBOX) ||
(folder_type == TNY_FOLDER_TYPE_ROOT)) {
rules |= MODEST_FOLDER_RULES_FOLDER_NON_DELETABLE;
g_free (fname);
return;
}
-
- if (type == TNY_FOLDER_TYPE_NORMAL || type == TNY_FOLDER_TYPE_UNKNOWN) {
- type = modest_tny_folder_guess_folder_type_from_name (fname);
+
+ /* We include the MERGE type here because it's used to create
+ the local OUTBOX folder */
+ if (type == TNY_FOLDER_TYPE_NORMAL ||
+ type == TNY_FOLDER_TYPE_UNKNOWN ||
+ type == TNY_FOLDER_TYPE_MERGE) {
+ type = modest_tny_folder_guess_folder_type (TNY_FOLDER (instance));
}
switch (type) {