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
This commit is contained in:
Antonio Xu
2003-07-02 18:38:41 +00:00
committed by Jeffrey Stedfast
parent 34ac708eae
commit e712cc248a
2 changed files with 16 additions and 1 deletions

View File

@ -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

View File

@ -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);