diff options
Diffstat (limited to 'composer/e-msg-composer-attachment.c')
-rw-r--r-- | composer/e-msg-composer-attachment.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c index ddb73f2f52..7036461bbf 100644 --- a/composer/e-msg-composer-attachment.c +++ b/composer/e-msg-composer-attachment.c @@ -201,11 +201,7 @@ e_msg_composer_attachment_new (const char *file_name, camel_object_unref (CAMEL_OBJECT (wrapper)); camel_mime_part_set_disposition (part, disposition); - if (strchr (file_name, '/')) - filename = e_utf8_from_locale_string (strrchr (file_name, '/') + 1); - else - filename = e_utf8_from_locale_string (file_name); - + filename = e_utf8_from_locale_string (g_basename (file_name)); camel_mime_part_set_filename (part, filename); g_free (filename); |