Package: gnome-vfs / 1:2.24.4-6

11_mime_text_parent.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Index: gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-mime-info-cache.c
===================================================================
--- gnome-vfs-2.24.2.orig/libgnomevfs/gnome-vfs-mime-info-cache.c	2009-04-20 12:46:46.000000000 +0200
+++ gnome-vfs-2.24.2/libgnomevfs/gnome-vfs-mime-info-cache.c	2010-02-06 11:55:47.809283073 +0100
@@ -702,7 +702,13 @@
 	for (i = 0; parents && parents[i] != NULL; i++) {
 		l = g_list_prepend (l, g_strdup (parents[i]));
 	}
-	
+
+	/* Special case for text/something */
+	if (g_str_has_prefix (mime_type, "text/") &&
+	    strcmp (mime_type, "text/plain")) {
+		l = g_list_prepend (l, g_strdup ("text/plain"));
+	}
+
 	G_UNLOCK (gnome_vfs_mime_mutex);
 
 	return g_list_reverse (l);