aboutsummaryrefslogtreecommitdiff
path: root/libsylph/filter.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-09-14 05:27:03 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2009-09-14 05:27:03 +0000
commita94ab16492fbcd9c4b568a237bd21df8aed78763 (patch)
tree5754ccb1f4239963572ccb449842d8dc610a444c /libsylph/filter.c
parent5ca8acc55bfcd804401e885f863f0f88ddfacdcb (diff)
update summary caches on receiving.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2247 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/filter.c')
-rw-r--r--libsylph/filter.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/libsylph/filter.c b/libsylph/filter.c
index fb2cd1ea..9ea834ff 100644
--- a/libsylph/filter.c
+++ b/libsylph/filter.c
@@ -1,6 +1,6 @@
/*
* LibSylph -- E-Mail client library
- * Copyright (C) 1999-2007 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2009 Hiroyuki Yamamoto
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -244,12 +244,17 @@ gint filter_action_exec(FilterRule *rule, MsgInfo *msginfo, const gchar *file,
fltinfo->actions[action->type] = TRUE;
}
} else {
- if (folder_item_add_msg(dest_folder, file,
- &fltinfo->flags,
- FALSE) < 0) {
+ MsgFlags save_flags;
+
+ save_flags = msginfo->flags;
+ msginfo->flags = fltinfo->flags;
+ if (folder_item_add_msg_msginfo
+ (dest_folder, msginfo, FALSE) < 0) {
+ msginfo->flags = save_flags;
fltinfo->error = FLT_ERROR_ERROR;
return -1;
}
+ msginfo->flags = save_flags;
fltinfo->actions[action->type] = TRUE;
}