From 9208f104c01d8691375ed440e2ad49c2d281c87a Mon Sep 17 00:00:00 2001 From: monsta Date: Tue, 26 Jul 2016 17:01:35 +0300 Subject: fix sendto with non-latin filenames or filenames with spaces adapted from: https://git.gnome.org/browse/evince/commit/?id=00acd7274797fe3576be92f21faa32fd8692c95d --- shell/ev-window.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'shell') diff --git a/shell/ev-window.c b/shell/ev-window.c index 1149c929..27ecdaa6 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -3140,10 +3140,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", caja_sendto, uri); + unescaped_uri = g_uri_unescape_string (uri, NULL); + command = g_strdup_printf ("%s \"%s\"", caja_sendto, unescaped_uri); + g_free (unescaped_uri); app_info = g_app_info_create_from_commandline (command, NULL, 0, &error); if (app_info) { GdkAppLaunchContext *context; -- cgit v1.2.1