[totem-pl-parser] Bug 584312 – Totem does not ignore text files when adding to queue
- From: Bastien Nocera <hadess src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [totem-pl-parser] Bug 584312 – Totem does not ignore text files when adding to queue
- Date: Fri, 31 Jul 2009 16:39:54 +0000 (UTC)
commit 73db4d176c48deec762dc042befab4b0a4bda5ab
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 a4be352..42c6bad 100644
--- a/plparse/totem-pl-parser.c
+++ b/plparse/totem-pl-parser.c
@@ -1876,13 +1876,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]