aboutsummaryrefslogtreecommitdiff
path: root/libsylph/mbox.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-06 07:59:36 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-06 07:59:36 +0000
commit57d3cf597bc3161b682906beac134d80f6f9b8d7 (patch)
treef4a0b0d5484cdc6a5d4e6da1bb7512abd2dcdaf4 /libsylph/mbox.c
parente80b802395604008b0f978e454e95affb39e240a (diff)
filter junk mails from local mbox even if prefs_common.filter_on_inc is FALSE.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1531 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/mbox.c')
-rw-r--r--libsylph/mbox.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/libsylph/mbox.c b/libsylph/mbox.c
index 7385c285..10e94297 100644
--- a/libsylph/mbox.c
+++ b/libsylph/mbox.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2006 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2007 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -58,6 +58,13 @@
gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table)
{
+ return proc_mbox_full(dest, mbox, folder_table,
+ folder_table ? TRUE : FALSE);
+}
+
+gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
+ GHashTable *folder_table, gboolean apply_filter)
+{
FILE *mbox_fp;
gchar buf[MSGBUFSIZE], from_line[MSGBUFSIZE];
gchar *tmp_file;
@@ -204,18 +211,18 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table)
fltinfo->flags.perm_flags = MSG_NEW|MSG_UNREAD;
fltinfo->flags.tmp_flags = MSG_RECEIVED;
- if (folder_table && prefs_common.enable_junk &&
+ if (prefs_common.enable_junk &&
prefs_common.filter_junk_on_recv &&
prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,
fltinfo);
}
- if (!fltinfo->drop_done && folder_table)
+ if (!fltinfo->drop_done && apply_filter)
filter_apply(prefs_common.fltlist, tmp_file, fltinfo);
if (!fltinfo->drop_done &&
- folder_table && prefs_common.enable_junk &&
+ prefs_common.enable_junk &&
prefs_common.filter_junk_on_recv &&
!prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,