Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:IBBoard:desktop
tracker-miners
tracker-miner-bom-fudge.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File tracker-miner-bom-fudge.diff of Package tracker-miners
diff --git a/src/tracker-extract/tracker-gsf.c b/src/tracker-extract/tracker-gsf.c index ebe2735be..4a4fe7025 100644 --- a/src/tracker-extract/tracker-gsf.c +++ b/src/tracker-extract/tracker-gsf.c @@ -149,7 +149,14 @@ tracker_gsf_parse_xml_in_zip (const gchar *zip_file_uri, accum += chunk_size; /* Pass the read stream to the context parser... */ - g_markup_parse_context_parse (context, buf, chunk_size, &error); + if (accum == chunk_size && buf[0] == 0xEF && buf[1] == 0xBB && buf[2] == 0xBF) { + /* Skip the BOM that some files include (may break parsing if it isn't UTF-8) */ + accum -= 3; + guint8* start = &buf[3]; + g_markup_parse_context_parse (context, start, chunk_size - 3, &error); + } else { + g_markup_parse_context_parse (context, buf, chunk_size, &error); + } /* update bytes to be read */ remaining_size -= chunk_size;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor