aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/mbox.c15
-rw-r--r--libsylph/mbox.h7
2 files changed, 17 insertions, 5 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,
diff --git a/libsylph/mbox.h b/libsylph/mbox.h
index ce0f9112..eb29ecac 100644
--- a/libsylph/mbox.h
+++ b/libsylph/mbox.h
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2005 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
@@ -32,6 +32,11 @@ typedef enum {
gint proc_mbox (FolderItem *dest,
const gchar *mbox,
GHashTable *folder_table);
+gint proc_mbox_full (FolderItem *dest,
+ const gchar *mbox,
+ GHashTable *folder_table,
+ gboolean apply_filter);
+
gint lock_mbox (const gchar *base,
LockType type);
gint unlock_mbox (const gchar *base,