[totem-pl-parser/gnome-2-26] Bug 584312 – Totem does not ignore text files when adding to queue



commit a9b4602249c2c402662a4a6bf158cd7252c98e74
Author: Bastien Nocera <hadess hadess net>
Date:   Fri Jul 31 17:36:09 2009 +0100

    Bug 584312 â?? Totem does not ignore text files when adding to queue
    
    Ignore dual-types that are still text/plain after data check.
    Before that, this only happened if we didn't have data for the
    file yet, but we're certain we do now, so we can gently ignore.

 plparse/totem-pl-parser.c |   15 +++++++++------
 1 files changed, 9 insertions(+), 6 deletions(-)
---
diff --git a/plparse/totem-pl-parser.c b/plparse/totem-pl-parser.c
index 83a35c3..20537c9 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -1759,13 +1759,16 @@ totem_pl_parser_parse_internal (TotemPlParser *parser,
 				if (data == NULL) {
 					g_free (mimetype);
 					mimetype = my_g_file_info_get_mime_type_with_data (file, &data, parser);
-					/* If it's _still_ a text/plain, we don't want it */
-					if (mimetype == NULL || strcmp (mimetype, "text/plain") == 0) {
-						g_free (mimetype);
-						mimetype = NULL;
-						break;
-					}
+					DEBUG(file, g_print ("URI '%s' dual type has type '%s' from data\n", uri, mimetype));
 				}
+				/* If it's _still_ a text/plain, we don't want it */
+				if (mimetype == NULL || strcmp (mimetype, "text/plain") == 0) {
+					ret = TOTEM_PL_PARSER_RESULT_IGNORED;
+					g_free (mimetype);
+					mimetype = NULL;
+					break;
+				}
+
 				if (base_file == NULL)
 					base_file = g_file_get_parent (file);
 				else



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