Shell quote argv[0] before spawning a process
The path to the executable may contain spaces.
This commit is contained in:
parent
9a0e2bffef
commit
b6247e3314
1 changed files with 6 additions and 1 deletions
|
@ -2139,7 +2139,12 @@ static void
|
|||
midori_browser_spawn_app (const gchar* uri)
|
||||
{
|
||||
const gchar* executable = sokoke_get_argv (NULL)[0];
|
||||
gchar* command = g_strconcat (executable, " -a", NULL);
|
||||
/* "midori"
|
||||
"/usr/bin/midori"
|
||||
"c:/Program Files/Midori/bin/midori.exe" */
|
||||
gchar* quoted = g_shell_quote (executable);
|
||||
gchar* command = g_strconcat (quoted, " -a", NULL);
|
||||
g_free (quoted);
|
||||
sokoke_spawn_program (command, uri, FALSE);
|
||||
g_free (command);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue