continue;
if (folder->inbox == NULL)
continue;
+ if (folder->klass->type == F_UNKNOWN)
+ continue;
return folder->inbox;
}
continue;
if (folder->outbox == NULL)
continue;
+ if (folder->klass->type == F_UNKNOWN)
+ continue;
return folder->outbox;
}
continue;
if (folder->draft == NULL)
continue;
+ if (folder->klass->type == F_UNKNOWN)
+ continue;
return folder->draft;
}
continue;
if (folder->queue == NULL)
continue;
+ if (folder->klass->type == F_UNKNOWN)
+ continue;
return folder->queue;
}
continue;
if (folder->trash == NULL)
continue;
+ if (folder->klass->type == F_UNKNOWN)
+ continue;
return folder->trash;
}
(item->stype == F_INBOX) &&
(item->folder->account != NULL) &&
(item->folder->account->filter_on_recv) &&
- procmsg_msginfo_filter(msginfo))
+ procmsg_msginfo_filter(msginfo, item->folder->account))
to_filter = g_slist_prepend(to_filter, msginfo);
else {
exists_list = g_slist_prepend(exists_list, msginfo);
g_hash_table_destroy(subject_table);
}
+ if (item->new_msgs != newcnt || item->unread_msgs != unreadcnt
+ || item->total_msgs != totalcnt || item->marked_msgs != markedcnt
+ || item->unreadmarked_msgs != unreadmarkedcnt) {
+ update_flags |= F_ITEM_UPDATE_CONTENT;
+ }
+
item->new_msgs = newcnt;
item->unread_msgs = unreadcnt;
item->total_msgs = totalcnt;
FolderItemPrefs *prefs;
gint filemode = 0;
gchar *id;
+ time_t last_mtime = (time_t)0;
+ gboolean need_scan = FALSE;
if (!item || !item->path || !item->cache)
return;
+ if (FOLDER_TYPE(item->folder) == F_MH) {
+ last_mtime = item->mtime;
+ need_scan = item->folder->klass->scan_required(item->folder, item);
+ }
+
id = folder_item_get_identifier(item);
debug_print("Save cache for folder %s\n", id);
g_free(id);
}
}
+ if (!need_scan && FOLDER_TYPE(item->folder) == F_MH) {
+ if (item->mtime == last_mtime)
+ item->mtime = time(NULL);
+ }
+
g_free(cache_file);
g_free(mark_file);
}
perm_flags |= MSG_IGNORE_THREAD;
/* Unset tmp flags that should not be copied */
- tmp_flags &= ~(MSG_MOVE | MSG_COPY);
+ tmp_flags &= ~(MSG_MOVE | MSG_COPY | MSG_MOVE_DONE);
/* unset flags that are set but should not */
/* and set new flags */
* copying was successfull and update folder
* message counts
*/
- if (item->folder->klass->remove_msgs) {
+ if (not_moved == NULL && item->folder->klass->remove_msgs) {
item->folder->klass->remove_msgs(item->folder,
msginfo->folder,
msglist,
statusbar_progress_all(curmsg++,total, 10);
/* apply pre global rules */
- filter_message_by_msginfo(pre_global_processing, msginfo);
+ filter_message_by_msginfo(pre_global_processing, msginfo, NULL);
/* apply rules of the folder */
- filter_message_by_msginfo(processing_list, msginfo);
+ filter_message_by_msginfo(processing_list, msginfo, NULL);
/* apply post global rules */
- filter_message_by_msginfo(post_global_processing, msginfo);
+ filter_message_by_msginfo(post_global_processing, msginfo, NULL);
}
if (pre_global_processing || processing_list