Re: [evolution-patches] Please review my patch for bug #44065
- From: Not Zed <notzed ximian com>
- To: Larry Ewing <lewing ximian com>
- Cc: Antonio Xu <antonio xu sun com>, patches <evolution-patches ximian com>
- Subject: Re: [evolution-patches] Please review my patch for bug #44065
- Date: 25 Jun 2003 11:35:04 +0930
I will also add ... we just had a serious problem come about because of
code like this, and we have another bug we can't fix yet because of
numerous chunks of code like this.
Dont to it - just use a CamelURL to get the path, and you wont have to
worry about the details. And use g_ascii_strcasecmp as well.
The only issue i wonder about is how the url's are encoded, inside
another url, etc.
On Wed, 2003-06-25 at 01:46, Larry Ewing wrote:
> A uri beginning with file:// has to be followed with a hostname or a /.
> So for example file://usr/bin is really refering to the file bin on the
> host usr. Simply stripping the file:// will break resolution of a uri
> like file://localhost/home/lewing/attachment.png so this fix isn't
> proper. Strictly speaking file:/home/lewing/attachment.png isn't valid
> either but at least it doesn't have an ambiguous case. Please see
> RFC1738.
>
> --Larry
>
> On Tue, 2003-06-24 at 09:12, Antonio Xu wrote:
> > Hello All,
> > Could you review my patch for bug #44065?
> > Bug Summary:evolution mailto: commandline is better also
> > to accept attachments with file:// URLs
> > 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);
>
> _______________________________________________
> Evolution-patches mailing list
> Evolution-patches lists ximian com
> http://lists.ximian.com/mailman/listinfo/evolution-patches
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]