[evolution-patches] Please review my new patch for bug #44065



Hello All,
     Could you review my new patch for bug #44065? I have change
some codes according to NotZed's advice, bI use CamelURL to
extract file path, and use g_ascii_strncasecmp instead of using g_strncasecmp Bug Summary:evolution mailto: commandline is better also to accept attachments with file:// URL I just remove "file:" form file url for fixing this bug.
Thanks
Antonio Xu



Index: composer/e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.394
diff -u -r1.394 e-msg-composer.c
--- composer/e-msg-composer.c	17 Jun 2003 19:47:53 -0000	1.394
+++ composer/e-msg-composer.c	24 Jun 2003 13:21:00 -0000
@@ -3814,7 +3814,7 @@
 	EMsgComposerHdrs *hdrs;
 	GList *to = NULL, *cc = NULL, *bcc = NULL;
 	EDestination **tov, **ccv, **bccv;
-	char *subject = NULL, *body = NULL;
+	char *subject = NULL, *body = NULL, *path = NULL;
 	const char *p, *header;
 	size_t nread, nwritten;
 	char *content;
@@ -3882,7 +3882,9 @@
 					}
 				}
 			} 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*/
+				path = (!g_strncasecmp(content, "file:", 5)) ? content + 5 : content;
+				e_msg_composer_attachment_bar_attach (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), path);
 			} else {
 				/* add an arbitrary header? */
 				e_msg_composer_add_header (composer, header, content);




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]