mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-12 23:46:17 +01:00
Escape arguments when putting together a cmdline
See bug 623770
This commit is contained in:
parent
607fec50e6
commit
fcddf9c2a1
@ -698,18 +698,28 @@ expand_macro (char macro,
|
||||
if (info->icon_name)
|
||||
{
|
||||
g_string_append (exec, "--icon ");
|
||||
g_string_append (exec, info->icon_name);
|
||||
expanded = g_shell_quote (info->icon_name);
|
||||
g_string_append (exec, expanded);
|
||||
g_free (expanded);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'c':
|
||||
if (info->name)
|
||||
g_string_append (exec, info->name);
|
||||
{
|
||||
expanded = g_shell_quote (info->name);
|
||||
g_string_append (exec, expanded);
|
||||
g_free (expanded);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'k':
|
||||
if (info->filename)
|
||||
g_string_append (exec, info->filename);
|
||||
{
|
||||
expanded = g_shell_quote (info->filename);
|
||||
g_string_append (exec, info->filename);
|
||||
g_free (expanded);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'm': /* deprecated */
|
||||
|
Loading…
Reference in New Issue
Block a user