totem-pl-parser r133 - in trunk: . plparse
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem-pl-parser r133 - in trunk: . plparse
- Date: Sat, 24 May 2008 18:08:39 +0000 (UTC)
Author: hadess
Date: Sat May 24 18:08:39 2008
New Revision: 133
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=133&view=rev
Log:
2008-05-24 Bastien Nocera <hadess hadess net>
* plparse/totem-pl-parser.c (totem_pl_parser_parse_internal):
When a file is local (native), and looks like a text file,
get its mime-type from data, so as to avoid not reading
through ASP, and PHP files that Firefox/Epiphany would give us
(Closes: #524144)
Modified:
trunk/ChangeLog
trunk/plparse/totem-pl-parser.c
Modified: trunk/plparse/totem-pl-parser.c
==============================================================================
--- trunk/plparse/totem-pl-parser.c (original)
+++ trunk/plparse/totem-pl-parser.c Sat May 24 18:08:39 2008
@@ -1430,7 +1430,8 @@
}
DEBUG(file, g_print ("_get_mime_type_for_name for '%s' returned '%s'\n", uri, mimetype));
- if (mimetype == NULL || strcmp (UNKNOWN_TYPE, mimetype) == 0) {
+ if (mimetype == NULL || strcmp (UNKNOWN_TYPE, mimetype) == 0
+ || (g_file_is_native (file) && g_content_type_is_a (mimetype, "text/plain") != FALSE)) {
g_free (mimetype);
mimetype = my_g_file_info_get_mime_type_with_data (file, &data, parser);
DEBUG(file, g_print ("_get_mime_type_with_data for '%s' returned '%s'\n", uri, mimetype ? mimetype : "NULL"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]