[evolution-exchange/gnome-3-0] Downstream bug bnc#694001 attachment name corruption



commit ebb8691f5ab015c4adc744ef803483257f452336
Author: Punit Jain <jpunit novell com>
Date:   Fri Jul 22 19:25:22 2011 +0530

    Downstream bug bnc#694001 attachment name corruption

 calendar/e-cal-backend-exchange.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/calendar/e-cal-backend-exchange.c b/calendar/e-cal-backend-exchange.c
index b0bd792..1aae982 100644
--- a/calendar/e-cal-backend-exchange.c
+++ b/calendar/e-cal-backend-exchange.c
@@ -2063,7 +2063,10 @@ build_msg ( ECalBackendExchange *cbex, ECalComponent *comp, const gchar *subject
 		if (!strncmp ((gchar *)l->data, "file://", 7)) {
 			fname = g_filename_from_uri ((gchar *)l->data, NULL, NULL);
 			filename = g_path_get_basename (fname);
-			mime_filename = g_strdup (filename + strlen (uid) + 1);
+			if (g_str_has_prefix (filename, uid))
+				mime_filename = g_strdup (filename + strlen(uid) + 1);
+			else
+				mime_filename = g_strdup (filename);
 			g_free (filename);
 			attach_file = fname;
 		} else {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]