diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | libsylph/libsylph-0.def | 1 | ||||
-rw-r--r-- | libsylph/procmsg.c | 18 |
3 files changed, 18 insertions, 7 deletions
@@ -1,5 +1,11 @@ 2011-06-10 + * libsylph/procmsg.c + libsylph/libsylph-0.def: procmsg_add_messages_from_queue(): + fixed an error when removing queued messages on win32. + +2011-06-10 + * src/compose.c plugin/test/test.c: changed the spec of compose-send signal because the previous one prohibited sending if the signal is not 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; |