From: Dirk-Jan C. Binnema Date: Tue, 26 Jun 2007 18:06:07 +0000 (+0000) Subject: * some other apps (sketch) send attachment list that start with ','. X-Git-Tag: git_migration_finished~3094 X-Git-Url: http://git.maemo.org/git/?p=modest;a=commitdiff_plain;h=6645085f780e1d39ef9577a1f0b630156fc34ef8 * some other apps (sketch) send attachment list that start with ','. strip that one, to prevent a warnings later. pmo-trunk-r2441 --- 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(