From 6645085f780e1d39ef9577a1f0b630156fc34ef8 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Tue, 26 Jun 2007 18:06:07 +0000 Subject: [PATCH] * some other apps (sketch) send attachment list that start with ','. strip that one, to prevent a warnings later. pmo-trunk-r2441 --- src/dbus_api/modest-dbus-callbacks.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/dbus_api/modest-dbus-callbacks.c b/src/dbus_api/modest-dbus-callbacks.c index d986723..71b4ae6 100644 --- a/src/dbus_api/modest-dbus-callbacks.c +++ b/src/dbus_api/modest-dbus-callbacks.c @@ -364,6 +364,14 @@ on_idle_compose_mail(gpointer user_data) ModestWindow *win = modest_msg_edit_window_new (msg, account_name); + /* it seems Sketch at least sends a leading ',' -- take that into account, + * ie strip that ,*/ + if (idle_data->attachments && idle_data->attachments[0]==',') { + gchar *tmp = g_strdup (idle_data->attachments + 1); + g_free(idle_data->attachments); + idle_data->attachments = tmp; + } + list = g_strsplit(idle_data->attachments, ",", 0); for (i=0; list[i] != NULL; i++) { modest_msg_edit_window_attach_file_noninteractive( -- 1.7.9.5