[glib] Fix mime_info_cache_dir_add_desktop_entries



commit 6555e0171d6f9619b0f49109868fe99162ffbb72
Author: Matthias Clasen <mclasen redhat com>
Date:   Tue Sep 29 20:52:26 2009 -0400

    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 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/gio/gdesktopappinfo.c b/gio/gdesktopappinfo.c
index 65bd96e..98ad3d8 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]));
     }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]