Skip to content

Commit

Permalink
xdg-utils: Properly quote flatpak command
Browse files Browse the repository at this point in the history
`xdp_app_info_rewrite_commandline` has to respect `quote_escape` also
when no commandline is given.

Fixes #1118
  • Loading branch information
jsparber authored and GeorgesStavracas committed Oct 3, 2023
1 parent 43783e2 commit ce57c6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/xdp-utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -397,8 +397,10 @@ xdp_app_info_rewrite_commandline (XdpAppInfo *app_info,
for (i = 1; commandline[i]; i++)
g_ptr_array_add (args, maybe_quote (commandline[i], quote_escape));
}
else
else if (quote_escape)
g_ptr_array_add (args, g_shell_quote (app_info->id));
else
g_ptr_array_add (args, g_strdup (app_info->id));
g_ptr_array_add (args, NULL);

return (char **)g_ptr_array_free (g_steal_pointer (&args), FALSE);
Expand Down

0 comments on commit ce57c6c

Please sign in to comment.