After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 673465 - Command line never properly generated for sending mail
Command line never properly generated for sending mail
Status: RESOLVED FIXED
Product: nautilus-sendto
Classification: Applications
Component: general
3.0.x
Other Linux
: Normal critical
: ---
Assigned To: nautilus-sendto-maint
nautilus-sendto-maint
: 673467 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2012-04-03 23:25 UTC by Laurent Bigonville
Modified: 2012-04-11 14:21 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Fix command line used to call the mail client (922 bytes, patch)
2012-04-04 12:29 UTC, Laurent Bigonville
none Details | Review
Fix command line used to call the mail client (915 bytes, patch)
2012-04-04 12:47 UTC, Laurent Bigonville
none Details | Review
Fix command line used to call the mail client (915 bytes, patch)
2012-04-04 12:51 UTC, Laurent Bigonville
none Details | Review

Description Laurent Bigonville 2012-04-03 23:25:33 UTC
When trying to send an attachment by mail, the command line is never properly generated.

This is due to an improper use of g_strdup_printf:

cmd = g_strdup_printf (mail_cmd, mailto->str);

The function should be used like this instead:

cmd = g_strdup_printf ("%s%s", mail_cmd, mailto->str);
Comment 1 Laurent Bigonville 2012-04-03 23:29:15 UTC
this issue seems present in both master and gnome-3-0
Comment 2 Laurent Bigonville 2012-04-04 12:29:47 UTC
Created attachment 211286 [details] [review]
Fix command line used to call the mail client

g_strdup_printf() requires a format string like printf()
Comment 3 Laurent Bigonville 2012-04-04 12:47:03 UTC
Created attachment 211288 [details] [review]
Fix command line used to call the mail client

g_strdup_printf() requires a format string like printf()

Branch: gnome-3-0
Comment 4 Laurent Bigonville 2012-04-04 12:51:35 UTC
Created attachment 211290 [details] [review]
Fix command line used to call the mail client

g_strdup_printf() requires a format string like printf()

Branch: gnome-3-0
Comment 5 Bastien Nocera 2012-04-11 10:35:20 UTC
*** Bug 673467 has been marked as a duplicate of this bug. ***
Comment 6 Bastien Nocera 2012-04-11 10:36:15 UTC
Fixed in gnome-3-0:
commit a3449cc91846792543abc80266fd42eebfe6bb6a
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed Apr 11 11:13:52 2012 +0100

    evolution: Fix command generation
    
    Since the GAppInfo move. %U needs to be transformed so it
    can be "printed" properly.

And master:

commit 554bfe5a1f890a412a1198741d96493b74c9f56a
Author: Bastien Nocera <hadess@hadess.net>
Date:   Wed Apr 11 11:13:52 2012 +0100

    evolution: Fix command generation
    
    Since the GAppInfo move. %U needs to be transformed so it
    can be "printed" properly.
    
    Conflicts:
    
        src/plugins/evolution/evolution.c
Comment 7 Laurent Bigonville 2012-04-11 14:12:20 UTC
I'm not sure if g_strrstr() is case sensitive, but looking at http://git.gnome.org/browse/nautilus-sendto/commit/?h=gnome-3-0&id=a3449cc91846792543abc80266fd42eebfe6bb6a you are replacing %U by %s,the claws-mail.desktop is using %u
Comment 8 Bastien Nocera 2012-04-11 14:21:03 UTC
(In reply to comment #7)
> I'm not sure if g_strrstr() is case sensitive, but looking at
> http://git.gnome.org/browse/nautilus-sendto/commit/?h=gnome-3-0&id=a3449cc91846792543abc80266fd42eebfe6bb6a
> you are replacing %U by %s,the claws-mail.desktop is using %u

We need to handle both (one means only URLs, the other one URLs or local paths[1]). Fixed in master and gnome-3-0.

[1]: http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s06.html