Mercurial > pidgin.yaz
changeset 2478:ad4a0b3f0032
[gaim-migrate @ 2491]
handle spaces better
committer: Tailor Script <tailor@pidgin.im>
author | Eric Warmenhoven <eric@warmenhoven.org> |
---|---|
date | Wed, 10 Oct 2001 20:42:19 +0000 |
parents | 8530d4d72fab |
children | 66b27e902b7b |
files | src/browser.c src/sound.c |
diffstat | 2 files changed, 11 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/src/browser.c Wed Oct 10 20:23:25 2001 +0000 +++ b/src/browser.c Wed Oct 10 20:42:19 2001 +0000 @@ -611,7 +611,8 @@ *ms = 0; g_snprintf(command, sizeof(command), "%s\"%s\"%s", web_command, url, ms + 2); - } + } else + g_snprintf(command, sizeof(command), web_command); args[0] = "sh"; args[1] = "-c";
--- a/src/sound.c Wed Oct 10 20:23:25 2001 +0000 +++ b/src/sound.c Wed Oct 10 20:42:19 2001 +0000 @@ -398,7 +398,15 @@ if (sound_cmd[0]) { char *args[4]; char command[4096]; - g_snprintf(command, sizeof command, sound_cmd, filename); + char *ms; + if (strstr(sound_cmd, "\"%s\"")) + g_snprintf(command, sizeof(command), sound_cmd, filename); + else if ((ms = strstr(sound_cmd, "%s")) != NULL) { + *ms = 0; + g_snprintf(command, sizeof(command), "%s\"%s\"%s", sound_cmd, + filename, ms + 2); + } else + g_snprintf(command, sizeof(command), sound_cmd); args[0] = "sh"; args[1] = "-c"; args[2] = command;