diff options
author | monsta <[email protected]> | 2016-07-26 17:01:35 +0300 |
---|---|---|
committer | monsta <[email protected]> | 2016-07-26 17:01:35 +0300 |
commit | 9208f104c01d8691375ed440e2ad49c2d281c87a (patch) | |
tree | 4b9a8e5604d51efb5b47715ba8ca934bacf97a63 /shell | |
parent | 53b19649960bf982bbc6e54943db81e53d6c477e (diff) | |
download | atril-9208f104c01d8691375ed440e2ad49c2d281c87a.tar.bz2 atril-9208f104c01d8691375ed440e2ad49c2d281c87a.tar.xz |
fix sendto with non-latin filenames or filenames with spaces
adapted from:
https://git.gnome.org/browse/evince/commit/?id=00acd7274797fe3576be92f21faa32fd8692c95d
Diffstat (limited to 'shell')
-rw-r--r-- | 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 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; |