diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-06-10 09:41:40 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2011-06-10 09:41:40 +0000 |
commit | 251d6830c324a8f7302fceb6fd96ae3ec0078994 (patch) | |
tree | 1b25727d46d0c0ae85ab8cbf631d039d084b10f4 /libsylph | |
parent | 0a585bfc2bd775a576de8368a6d819cdfbd2173d (diff) |
fixed an error when removing queued messages on win32.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2895 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/libsylph-0.def | 1 | ||||
-rw-r--r-- | libsylph/procmsg.c | 18 |
2 files changed, 12 insertions, 7 deletions
diff --git a/libsylph/libsylph-0.def b/libsylph/libsylph-0.def index f313d0be..80ee21c6 100644 --- a/libsylph/libsylph-0.def +++ b/libsylph/libsylph-0.def @@ -695,3 +695,4 @@ EXPORTS folder_remote_folder_destroy_all_sessions @ 693
filter_junk_rule_create @ 694
folder_remote_folder_active_session_exist @ 695
+ procmsg_add_messages_from_queue @ 696
diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c index 6bff49cd..35d221af 100644 --- a/libsylph/procmsg.c +++ b/libsylph/procmsg.c @@ -1350,16 +1350,20 @@ gint procmsg_add_messages_from_queue(FolderItem *dest, GSList *mlist, dest_file = get_tmp_file(); debug_print("copy queued msg: %s -> %s\n", file, dest_file); - if (copy_file_part(fp, ftell(fp), G_MAXINT, dest_file) < 0) - is_error = TRUE; - else if (folder_item_add_msg(dest, dest_file, &flags, TRUE) < 0) { - g_unlink(dest_file); - is_error = TRUE; - } else if (is_move && folder_item_remove_msg(src, msginfo) < 0) + if (copy_file_part(fp, ftell(fp), G_MAXINT, dest_file) < 0) { + fclose(fp); is_error = TRUE; + } else { + fclose(fp); + if (folder_item_add_msg(dest, dest_file, &flags, TRUE) < 0) { + g_unlink(dest_file); + is_error = TRUE; + } else if (is_move && + folder_item_remove_msg(src, msginfo) < 0) + is_error = TRUE; + } g_free(dest_file); - fclose(fp); g_free(file); if (is_error) return -1; |