From 6555e0171d6f9619b0f49109868fe99162ffbb72 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Tue, 29 Sep 2009 20:52:26 -0400 Subject: [PATCH] Fix mime_info_cache_dir_add_desktop_entries This function tried to avoid adding duplicate entries, but failed due to using the wrong search function. See bug 595972. --- gio/gdesktopappinfo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c index 65bd96e08..98ad3d8fa 100644 --- a/gio/gdesktopappinfo.c +++ b/gio/gdesktopappinfo.c @@ -2356,7 +2356,7 @@ mime_info_cache_dir_add_desktop_entries (MimeInfoCacheDir *dir, for (i = 0; new_desktop_file_ids[i] != NULL; i++) { - if (!g_list_find (desktop_file_ids, new_desktop_file_ids[i])) + if (!g_list_find_custom (desktop_file_ids, new_desktop_file_ids[i], strcmp)) desktop_file_ids = g_list_append (desktop_file_ids, g_strdup (new_desktop_file_ids[i])); }