Mercurial > pidgin.yaz
changeset 10913:44e91a7708eb
[gaim-migrate @ 12669]
Fix 1196574 - invalid charset when executing commands
Could someone check that this doesn't break anything on windows please?
committer: Tailor Script <tailor@pidgin.im>
author | Stu Tomlinson <stu@nosnilmot.com> |
---|---|
date | Sat, 14 May 2005 13:52:03 +0000 |
parents | dcbc56eb3f37 |
children | 0249b1ad6322 |
files | src/gtkpounce.c |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkpounce.c Sat May 14 13:20:37 2005 +0000 +++ b/src/gtkpounce.c Sat May 14 13:52:03 2005 +0000 @@ -1014,11 +1014,13 @@ if (gaim_pounce_action_is_enabled(pounce, "execute-command")) { const char *command; + char *localecmd; command = gaim_pounce_action_get_attribute(pounce, "execute-command", "command"); + localecmd = g_locale_from_utf8(command, -1, NULL, NULL, NULL); - if (command != NULL) + if (localecmd != NULL) { #ifndef _WIN32 int pid = fork(); @@ -1028,7 +1030,7 @@ args[0] = "sh"; args[1] = "-c"; - args[2] = (char *)command; + args[2] = (char *)localecmd; args[3] = NULL; execvp(args[0], args); @@ -1049,6 +1051,7 @@ command); #endif /* !_WIN32 */ } + g_free(localecmd); } if (gaim_pounce_action_is_enabled(pounce, "play-sound"))