aboutsummaryrefslogtreecommitdiff
path: root/libsylph/mbox.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-08 01:53:42 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-02-08 01:53:42 +0000
commit51f4fa2f70d527f0496ce93ea67e066119af69bc (patch)
tree8ca6989ced6ecee6c7700d3f16301b148dca6f17 /libsylph/mbox.c
parent71fefa4187e49bc09bfda6cce14fe92ebd1f008d (diff)
don't filter junk on import.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1535 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/mbox.c')
-rw-r--r--libsylph/mbox.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/libsylph/mbox.c b/libsylph/mbox.c
index 10e94297..72c2c5f4 100644
--- a/libsylph/mbox.c
+++ b/libsylph/mbox.c
@@ -59,11 +59,14 @@
gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table)
{
return proc_mbox_full(dest, mbox, folder_table,
- folder_table ? TRUE : FALSE);
+ folder_table ? TRUE : FALSE,
+ folder_table && prefs_common.enable_junk &&
+ prefs_common.filter_junk_on_recv ? TRUE : FALSE);
}
gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
- GHashTable *folder_table, gboolean apply_filter)
+ GHashTable *folder_table, gboolean apply_filter,
+ gboolean filter_junk)
{
FILE *mbox_fp;
gchar buf[MSGBUFSIZE], from_line[MSGBUFSIZE];
@@ -211,8 +214,7 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
fltinfo->flags.perm_flags = MSG_NEW|MSG_UNREAD;
fltinfo->flags.tmp_flags = MSG_RECEIVED;
- if (prefs_common.enable_junk &&
- prefs_common.filter_junk_on_recv &&
+ if (filter_junk && prefs_common.enable_junk &&
prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,
fltinfo);
@@ -222,8 +224,7 @@ gint proc_mbox_full(FolderItem *dest, const gchar *mbox,
filter_apply(prefs_common.fltlist, tmp_file, fltinfo);
if (!fltinfo->drop_done &&
- prefs_common.enable_junk &&
- prefs_common.filter_junk_on_recv &&
+ filter_junk && prefs_common.enable_junk &&
!prefs_common.filter_junk_before) {
filter_apply(prefs_common.junk_fltlist, tmp_file,
fltinfo);