Commit 5cdbbd2c authored by Daniel Veillard's avatar Daniel Veillard

workaround misgenerated file: URIs c.f. #437385 daniel

* xmlIO.c: workaround misgenerated file: URIs c.f. #437385
daniel

svn path=/trunk/; revision=3630
parent d8ed1051
Tue Jun 12 11:37:55 CEST 2007 Daniel Veillard <daniel@veillard.com>
* xmlIO.c: workaround misgenerated file: URIs c.f. #437385
Tue Jun 12 11:22:47 CEST 2007 Daniel Veillard <daniel@veillard.com>
* relaxng.c: fixed bug #407436 a crash in a specific case of
......
......@@ -844,17 +844,24 @@ xmlFileOpen_real (const char *filename) {
return((void *) fd);
}
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17))
if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file://localhost/", 17)) {
#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
path = &filename[17];
#else
path = &filename[16];
#endif
else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
} else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:///", 8)) {
#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
path = &filename[8];
#else
path = &filename[7];
#endif
} else if (!xmlStrncasecmp(BAD_CAST filename, BAD_CAST "file:/", 6)) {
/* lots of generators seems to lazy to read RFC 1738 */
#if defined (_WIN32) || defined (__DJGPP__) && !defined(__CYGWIN__)
path = &filename[6];
#else
path = &filename[5];
#endif
} else
path = filename;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment