/pidgin/main: b02b90cece86: gtkxfer: add 'file://' scheme to pur...
Jakub Adam <[email protected]> Sat, 18 Jun 2016 22:10:08 -0400
| Newsgroups | gmane.comp.gnome.gaim.cvs |
|---|---|
| Message-ID | <[email protected]> |
Changeset: b02b90cece86d5155382700b25422474d48b0891 Author: Jakub Adam <[email protected]> Date: 2016-06-17 07:11 +0200 Branch: release-2.x.y URL: https://hg.pidgin.im/pidgin/main/rev/b02b90cece86 Description: gtkxfer: add 'file://' scheme to purple_notify_uri() argument The argument should be a URI, so make sure what we pass is one. Not doing so causes trouble when the filename contains spaces or special characters which may get escaped: '/tmp/some file.txt' turns into '/tmp/some%20file.txt' which for example xdg-open treats as a different and likely non-existent file. 'file:///tmp/some%20file.txt' is still a valid file URI though. Backport of Pidgin 3 commits d9798c40b7ec and 9ab6c9a03ae5. diffstat: pidgin/gtkft.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diffs (14 lines): diff --git a/pidgin/gtkft.c b/pidgin/gtkft.c --- a/pidgin/gtkft.c +++ b/pidgin/gtkft.c @@ -504,7 +504,9 @@ open_button_cb(GtkButton *button, Pidgin } else { - purple_notify_uri(NULL, filename); + gchar *uri = g_strdup_printf("file://%s", filename); + purple_notify_uri(NULL, uri); + g_free(uri); return; } _______________________________________________ Commits mailing list [email protected] https://pidgin.im/cgi-bin/mailman/listinfo/commits