diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-08-28 06:11:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-08-28 06:12:45 +0800 |
commit | ff2c9f849966118d23de068527f3f769b5339f00 (patch) | |
tree | 93214f04ee77ca3cdb6bfc9e34602371eb305472 /widgets/misc | |
parent | cef69607d59c2add63104504e6a5ecad2de51373 (diff) | |
download | gsoc2013-evolution-ff2c9f849966118d23de068527f3f769b5339f00.tar gsoc2013-evolution-ff2c9f849966118d23de068527f3f769b5339f00.tar.gz gsoc2013-evolution-ff2c9f849966118d23de068527f3f769b5339f00.tar.bz2 gsoc2013-evolution-ff2c9f849966118d23de068527f3f769b5339f00.tar.lz gsoc2013-evolution-ff2c9f849966118d23de068527f3f769b5339f00.tar.xz gsoc2013-evolution-ff2c9f849966118d23de068527f3f769b5339f00.tar.zst gsoc2013-evolution-ff2c9f849966118d23de068527f3f769b5339f00.zip |
Bug 628154 - Ignore paths in MIME part filenames
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-attachment.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c index e8ba75abee..468e164418 100644 --- a/widgets/misc/e-attachment.c +++ b/widgets/misc/e-attachment.c @@ -1778,11 +1778,14 @@ attachment_load_from_mime_part (LoadContext *load_context) } g_free (allocated); + /* Strip any path components from the filename. */ string = camel_mime_part_get_filename (mime_part); if (string == NULL) /* Translators: Default attachment filename. */ string = _("attachment.dat"); - g_file_info_set_display_name (file_info, string); + allocated = g_path_get_basename (string); + g_file_info_set_display_name (file_info, allocated); + g_free (allocated); attribute = G_FILE_ATTRIBUTE_STANDARD_DESCRIPTION; string = camel_mime_part_get_description (mime_part); |