Mercurial > pidgin
comparison src/sound.c @ 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 | cd81f1f2c896 |
children | 86eaeb064e82 |
comparison
equal
deleted
inserted
replaced
2477:8530d4d72fab | 2478:ad4a0b3f0032 |
---|---|
396 } | 396 } |
397 | 397 |
398 if (sound_cmd[0]) { | 398 if (sound_cmd[0]) { |
399 char *args[4]; | 399 char *args[4]; |
400 char command[4096]; | 400 char command[4096]; |
401 g_snprintf(command, sizeof command, sound_cmd, filename); | 401 char *ms; |
402 if (strstr(sound_cmd, "\"%s\"")) | |
403 g_snprintf(command, sizeof(command), sound_cmd, filename); | |
404 else if ((ms = strstr(sound_cmd, "%s")) != NULL) { | |
405 *ms = 0; | |
406 g_snprintf(command, sizeof(command), "%s\"%s\"%s", sound_cmd, | |
407 filename, ms + 2); | |
408 } else | |
409 g_snprintf(command, sizeof(command), sound_cmd); | |
402 args[0] = "sh"; | 410 args[0] = "sh"; |
403 args[1] = "-c"; | 411 args[1] = "-c"; |
404 args[2] = command; | 412 args[2] = command; |
405 args[3] = NULL; | 413 args[3] = NULL; |
406 execvp(args[0], args); | 414 execvp(args[0], args); |