[Xfce4-commits] <midori:master> Don't quote arguments given to g_file_new_for_commandline_arg

Christian Dywan noreply at xfce.org
Sun Nov 8 15:04:10 CET 2009


Updating branch refs/heads/master
         to 4dbc02d444919679c0f7f78ac9fb23246b6b75fc (commit)
       from f980d5ad91eee45649fec36a66ac49519e51bb15 (commit)

commit 4dbc02d444919679c0f7f78ac9fb23246b6b75fc
Author: Christian Dywan <christian at twotoasts.de>
Date:   Sun Nov 8 14:35:45 2009 +0100

    Don't quote arguments given to g_file_new_for_commandline_arg

 midori/sokoke.c |    8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diff --git a/midori/sokoke.c b/midori/sokoke.c
index e87d797..b831579 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;



More information about the Xfce4-commits mailing list