Fix mime_info_cache_dir_add_desktop_entries
authorMatthias Clasen <mclasen@redhat.com>
Wed, 30 Sep 2009 00:52:26 +0000 (20:52 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Wed, 30 Sep 2009 00:52:26 +0000 (20:52 -0400)
This function tried to avoid adding duplicate entries, but failed
due to using the wrong search function. See bug 595972.

gio/gdesktopappinfo.c

index 65bd96e..98ad3d8 100644 (file)
@@ -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]));
     }