Merge lp:~ted/ubuntu-app-launch/second-exec-quotes into lp:ubuntu-app-launch/14.04

Proposed by Ted Gould
Status: Merged
Approved by: Charles Kerr
Approved revision: 89
Merged at revision: 88
Proposed branch: lp:~ted/ubuntu-app-launch/second-exec-quotes
Merge into: lp:ubuntu-app-launch/14.04
Diff against target: 35 lines (+15/-8)
1 file modified
second-exec-core.c (+15/-8)
To merge this branch: bzr merge lp:~ted/ubuntu-app-launch/second-exec-quotes
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+197859@code.launchpad.net

Commit message

Use the parsing of the line to split appart the URLs.

Description of the change

Use the parsing of the line to split appart the URLs.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Charles Kerr (charlesk) wrote :

Confirmed that this MR WfM -- running "upstart-app-launch webbrowser-app http://www.ubuntu.com" twice from the command line as per the problem statement now works.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'second-exec-core.c'
--- second-exec-core.c 2013-09-27 17:48:33 +0000
+++ second-exec-core.c 2013-12-05 12:52:48 +0000
@@ -95,16 +95,23 @@
95 return;95 return;
96 }96 }
9797
98 /* TODO: Joining only with space could cause issues with breaking them
99 back out. We don't have any cases of more than one today. But, this
100 isn't good.
101 https://bugs.launchpad.net/upstart-app-launch/+bug/1229354
102 */
103 GVariant * uris = NULL;98 GVariant * uris = NULL;
104 gchar ** uri_split = g_strsplit(input_uris, " ", 0);99 gchar ** uri_split = NULL;
105 if (uri_split[0] == NULL) {100 GError * error = NULL;
106 g_free(uri_split);101
102 g_shell_parse_argv(input_uris, NULL, &uri_split, &error);
103
104 if (uri_split == NULL || uri_split[0] == NULL || error != NULL) {
105 if (error != NULL) {
106 g_warning("Unable to parse URLs '%s': %s", input_uris, error->message);
107 g_error_free(error);
108 }
109
107 uris = g_variant_new_array(G_VARIANT_TYPE_STRING, NULL, 0);110 uris = g_variant_new_array(G_VARIANT_TYPE_STRING, NULL, 0);
111
112 if (uri_split != NULL) {
113 g_strfreev(uri_split);
114 }
108 } else {115 } else {
109 GVariantBuilder builder;116 GVariantBuilder builder;
110 g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);117 g_variant_builder_init(&builder, G_VARIANT_TYPE_ARRAY);

Subscribers

People subscribed via source and target branches