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.
  • Loading branch information
jsparber committed Sep 14, 2023
1 parent a2ccb56 commit 4dc54f4
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 4dc54f4

Please sign in to comment.