From 4dbc02d444919679c0f7f78ac9fb23246b6b75fc Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Sun, 8 Nov 2009 14:35:45 +0100 Subject: [PATCH] Don't quote arguments given to g_file_new_for_commandline_arg --- midori/sokoke.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/midori/sokoke.c b/midori/sokoke.c index e87d797c..b831579a 100644 --- a/midori/sokoke.c +++ b/midori/sokoke.c @@ -146,7 +146,6 @@ sokoke_spawn_program (const gchar* command, const gchar* argument, gboolean quote) { - gchar* argument_escaped; GAppInfo* info; GFile* file; GList* files; @@ -154,12 +153,11 @@ sokoke_spawn_program (const gchar* command, g_return_val_if_fail (command != NULL, FALSE); g_return_val_if_fail (argument != NULL, FALSE); - - argument_escaped = quote ? g_shell_quote (argument) : g_strdup (argument); + /* quote is ignored */ info = g_app_info_create_from_commandline (command, NULL, G_APP_INFO_CREATE_NONE, NULL); - file = g_file_new_for_commandline_arg (argument_escaped); + file = g_file_new_for_commandline_arg (argument); files = g_list_append (NULL, file); error = NULL; @@ -167,13 +165,11 @@ sokoke_spawn_program (const gchar* command, { error_dialog (_("Could not run external program."), error->message); g_error_free (error); - g_free (argument_escaped); g_object_unref (file); g_list_free (files); return FALSE; } - g_free (argument_escaped); g_object_unref (file); g_list_free (files); return TRUE; -- 2.39.5