diff options
author | Antonio Xu <antonio.xu@sun.com> | 2003-07-03 02:38:41 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-07-03 02:38:41 +0800 |
commit | e712cc248aef07ba3828362552f9e56bdf833a06 (patch) | |
tree | a71e807ecc1a11c8d418845e2f0a1df39cf5857c | |
parent | 34ac708eae35982d21248a9b0a29f0d8ac8a3a78 (diff) | |
download | gsoc2013-evolution-e712cc248aef07ba3828362552f9e56bdf833a06.tar.gz gsoc2013-evolution-e712cc248aef07ba3828362552f9e56bdf833a06.tar.zst gsoc2013-evolution-e712cc248aef07ba3828362552f9e56bdf833a06.zip |
Change file url to absolute path. Fixes bug #44065.
2003-06-25 Antonio Xu <antonio.xu@sun.com>
* e-msg-composer.c (handle_mailto): Change file url to absolute
path. Fixes bug #44065.
svn path=/trunk/; revision=21726
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 12 |
2 files changed, 16 insertions, 1 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index f0b6e7fce4..7d4a19afbd 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2003-06-25 Antonio Xu <antonio.xu@sun.com> + + * e-msg-composer.c (handle_mailto): Change file url to absolute + path. Fixes bug #44065. + 2003-07-01 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer.c (autosave_load_draft): Connect to the diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index f68b89341e..5ab4dba822 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3827,6 +3827,7 @@ handle_mailto (EMsgComposer *composer, const char *mailto) size_t nread, nwritten; char *content; int len, clen; + CamelURL *url; /* Parse recipients (everything after ':' until '?' or eos). */ p = mailto + 7; @@ -3890,7 +3891,16 @@ handle_mailto (EMsgComposer *composer, const char *mailto) } } } else if (!strncasecmp (header, "attach", len)) { - e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), content); + /*Change file url to absolute path*/ + if (!strncasecmp (content, "file:", 5)) { + url = camel_url_new (content, NULL); + e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), + url->path); + camel_url_free (url); + } else { + e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), + content); + } } else { /* add an arbitrary header? */ e_msg_composer_add_header (composer, header, content); |