aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer.c12
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);