From 1d26c7c94ab8b6102c8e426b5174dd001fff53fb Mon Sep 17 00:00:00 2001 From: Wouter Bolsterlee Date: Mon, 24 Mar 2008 16:36:05 +0000 Subject: [PATCH] Use g_str_has_suffix. See bug #523069. 2008-03-24 Wouter Bolsterlee * shell/ev-window.c (image_save_dialog_response_cb): Use g_str_has_suffix. See bug #523069. svn path=/trunk/; revision=2979 --- ChangeLog | 6 ++++++ shell/ev-window.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6a677b80..aafbea0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2008-03-24 Wouter Bolsterlee + + * shell/ev-window.c (image_save_dialog_response_cb): + + Use g_str_has_suffix. See bug #523069. + 2008-03-22 Carlos Garcia Campos * configure.ac: diff --git a/shell/ev-window.c b/shell/ev-window.c index 9b2dedec..5c3b58f1 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -4784,7 +4784,7 @@ image_save_dialog_response_cb (GtkWidget *fc, } extensions = gdk_pixbuf_format_get_extensions (format); - if (strcmp (extensions[0], uri + strlen (uri) - strlen (extensions[0])) != 0) { + if (g_str_has_suffix(uri, extensions[0])) { gchar *uri_extension; uri_extension = g_strconcat (uri, ".", extensions[0], NULL); -- 2.43.5