totem-pl-parser r255 - in trunk: . plparse
- From: hadess svn gnome org
- To: svn-commits-list gnome org
- Subject: totem-pl-parser r255 - in trunk: . plparse
- Date: Thu, 13 Nov 2008 14:02:22 +0000 (UTC)
Author: hadess
Date: Thu Nov 13 14:02:22 2008
New Revision: 255
URL: http://svn.gnome.org/viewvc/totem-pl-parser?rev=255&view=rev
Log:
2008-11-13  Bastien Nocera  <hadess hadess net>
	* plparse/totem-pl-parser.c
	(my_g_file_info_get_mime_type_with_data),
	(totem_pl_parser_cleanup_xml): Fix _cleanup_xml to
	actually clean the comment closing bits ('-->')
	(Closes: #560051)
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	Thu Nov 13 14:02:22 2008
@@ -671,13 +671,14 @@
 		g_error_free (error);
 		return NULL;
 	}
-	DEBUG(file, g_print ("URL '%s' was opened successfully in _get_mime_type_with_data:\n", uri));
+	DEBUG(file, g_print ("URL '%s' was opened successfully in _get_mime_type_with_data\n", uri));
 
 	/* Read the whole thing, up to MIME_READ_CHUNK_SIZE */
 	buffer = g_malloc (MIME_READ_CHUNK_SIZE);
 	bytes_read = g_input_stream_read (G_INPUT_STREAM (stream), buffer, MIME_READ_CHUNK_SIZE, NULL, &error);
 	g_object_unref (G_INPUT_STREAM (stream));
 	if (bytes_read == -1) {
+		DEBUG(file, g_print ("Couldn't read data from '%s'\n", uri));
 		g_free (buffer);
 		return NULL;
 	}
@@ -1381,6 +1382,11 @@
 			if (*needle == '\0')
 				break;
 		}
+		if (strncmp (needle, "-->", 3) == 0) {
+			guint i;
+			for (i = 0; i < 3; i++)
+				*(needle + i) = ' ';
+		}
 	}
 }
 
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]