aboutsummaryrefslogtreecommitdiffstats
path: root/calendar
diff options
context:
space:
mode:
authorPunit Jain <jpunit@novell.com>2011-09-30 14:24:54 +0800
committerPunit Jain <jpunit@novell.com>2011-09-30 14:24:54 +0800
commit5c81e944e63fd1f0e653832c23a798a23e8c07eb (patch)
treedada6b7dac384f1e8192007f7a82fb3dfb873d40 /calendar
parent5ddad039926944120fa8f138f3a0039292d736de (diff)
downloadgsoc2013-evolution-5c81e944e63fd1f0e653832c23a798a23e8c07eb.tar
gsoc2013-evolution-5c81e944e63fd1f0e653832c23a798a23e8c07eb.tar.gz
gsoc2013-evolution-5c81e944e63fd1f0e653832c23a798a23e8c07eb.tar.bz2
gsoc2013-evolution-5c81e944e63fd1f0e653832c23a798a23e8c07eb.tar.lz
gsoc2013-evolution-5c81e944e63fd1f0e653832c23a798a23e8c07eb.tar.xz
gsoc2013-evolution-5c81e944e63fd1f0e653832c23a798a23e8c07eb.tar.zst
gsoc2013-evolution-5c81e944e63fd1f0e653832c23a798a23e8c07eb.zip
Bug #656378 attachment name corruption
Diffstat (limited to 'calendar')
-rw-r--r--calendar/gui/dialogs/comp-editor.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c
index 27427540b6..9a60f6d382 100644
--- a/calendar/gui/dialogs/comp-editor.c
+++ b/calendar/gui/dialogs/comp-editor.c
@@ -3010,6 +3010,7 @@ attachment_loaded_cb (EAttachment *attachment,
{
GFileInfo *file_info;
const gchar *display_name;
+ const gchar *new_name;
const gchar *uid;
/* Prior to 2.27.2, attachment files were named:
@@ -3041,9 +3042,10 @@ attachment_loaded_cb (EAttachment *attachment,
uid = g_object_get_data (G_OBJECT (attachment), "uid");
if (g_str_has_prefix (display_name, uid)) {
- g_file_info_set_display_name (
- file_info, display_name + strlen (uid) + 1);
+ new_name = g_strdup (display_name+strlen(uid)+1);
+ g_file_info_set_display_name (file_info, new_name);
g_object_notify (G_OBJECT (attachment), "file-info");
+ g_free (new_name);
}
e_attachment_load_handle_error (attachment, result, parent);