[evince] shell: Fix sent to when filename contains spaces
- From: Carlos Garcia Campos <carlosgc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evince] shell: Fix sent to when filename contains spaces
- Date: Tue, 7 Aug 2012 16:56:17 +0000 (UTC)
commit 00acd7274797fe3576be92f21faa32fd8692c95d
Author: Carlos Garcia Campos <carlosgc gnome org>
Date: Tue Aug 7 18:54:44 2012 +0200
shell: Fix sent to when filename contains spaces
Unscape the uri before building the command line and use quotes for the
command argument.
https://bugzilla.gnome.org/show_bug.cgi?id=681144
shell/ev-window.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/shell/ev-window.c b/shell/ev-window.c
index 70c4ce5..7c636e1 100644
--- a/shell/ev-window.c
+++ b/shell/ev-window.c
@@ -3028,10 +3028,13 @@ ev_window_cmd_send_to (GtkAction *action,
GAppInfo *app_info;
gchar *command;
const char *uri;
+ char *unescaped_uri;
GError *error = NULL;
uri = ev_window->priv->local_uri ? ev_window->priv->local_uri : ev_window->priv->uri;
- command = g_strdup_printf ("%s %s", nautilus_sendto, uri);
+ unescaped_uri = g_uri_unescape_string (uri, NULL);
+ command = g_strdup_printf ("%s \"%s\"", nautilus_sendto, unescaped_uri);
+ g_free (unescaped_uri);
app_info = g_app_info_create_from_commandline (command, NULL, 0, &error);
if (app_info) {
GdkAppLaunchContext *context;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]