diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-23 08:26:13 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-01-23 08:26:13 +0000 |
commit | 77288037d78abd6b3a9be9cdb1e831a1d16de49b (patch) | |
tree | f27cc99316fe3b6e154d5f2aa404958fb63e4aab /libsylph | |
parent | ffc3e6ae63e6cc882ee32ee2d3a9fd46980f7b03 (diff) |
imap.c: fixed a bug that cache files in source folder was not removed was fixed.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@918 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/imap.c | 26 |
1 files changed, 7 insertions, 19 deletions
diff --git a/libsylph/imap.c b/libsylph/imap.c index 43ccdeec..ac0cd1b2 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -1,6 +1,6 @@ /* * LibSylph -- E-Mail client library - * Copyright (C) 1999-2005 Hiroyuki Yamamoto + * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -1341,15 +1341,8 @@ static gint imap_do_copy_msgs(Folder *folder, FolderItem *dest, GSList *msglist, dest->updated = TRUE; - if (remove_source) { - ok = imap_remove_msgs_by_seq_set(folder, src, seq_list); - if (ok != IMAP_SUCCESS) { - imap_seq_set_free(seq_list); - return ok; - } - } - imap_seq_set_free(seq_list); + g_free(destdir); for (cur = msglist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; @@ -1358,18 +1351,13 @@ static gint imap_do_copy_msgs(Folder *folder, FolderItem *dest, GSList *msglist, dest->new++; if (MSG_IS_UNREAD(msginfo->flags)) dest->unread++; - - if (remove_source) { - src->total--; - if (MSG_IS_NEW(msginfo->flags)) - src->new--; - if (MSG_IS_UNREAD(msginfo->flags)) - src->unread--; - MSG_SET_TMP_FLAGS(msginfo->flags, MSG_INVALID); - } } - g_free(destdir); + if (remove_source) { + ok = imap_remove_msgs(folder, src, msglist); + if (ok != IMAP_SUCCESS) + return ok; + } if (ok == IMAP_SUCCESS) return 0; |