info->result = gnome_vfs_create (&handle, pair->filename, GNOME_VFS_OPEN_WRITE, FALSE, 0644);
if (info->result == GNOME_VFS_OK) {
+ GError *error = NULL;
stream = tny_vfs_stream_new (handle);
- if (tny_mime_part_decode_to_stream (pair->part, stream, NULL) < 0) {
+ if (tny_mime_part_decode_to_stream (pair->part, stream, &error) < 0) {
+ g_warning ("modest: could not save attachment %s: %d (%s)\n", pair->filename, error?error->code:-1, error?error->message:"Unknown error");
+
info->result = GNOME_VFS_ERROR_IO;
}
g_object_unref (G_OBJECT (stream));
g_slice_free (SaveMimePartPair, pair);
info->pairs = g_list_delete_link (info->pairs, info->pairs);
} else {
+ g_warning ("modest: could not create save attachment %s: %s\n", pair->filename, gnome_vfs_result_to_string (info->result));
save_mime_part_info_free (info, FALSE);
}