aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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);