mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-24 13:33:01 +03:00
io: Remove xmlParserInputBufferCreateFilenameSafe
This commit is contained in:
@@ -2039,14 +2039,21 @@ xmlNewInputFromFile(xmlParserCtxtPtr ctxt, const char *filename) {
|
||||
xmlParserInputPtr inputStream;
|
||||
const xmlChar *URI;
|
||||
xmlChar *canonic;
|
||||
int code;
|
||||
int code = XML_ERR_OK;
|
||||
|
||||
if ((ctxt == NULL) || (filename == NULL))
|
||||
return(NULL);
|
||||
|
||||
code = xmlParserInputBufferCreateFilenameSafe(filename,
|
||||
XML_CHAR_ENCODING_NONE, &buf);
|
||||
if (buf == NULL) {
|
||||
if (xmlParserInputBufferCreateFilenameValue != NULL) {
|
||||
buf = xmlParserInputBufferCreateFilenameValue(filename,
|
||||
XML_CHAR_ENCODING_NONE);
|
||||
if (buf == NULL)
|
||||
code = XML_IO_ENOENT;
|
||||
} else {
|
||||
code = xmlParserInputBufferCreateFilenameInt(filename,
|
||||
XML_CHAR_ENCODING_NONE, &buf);
|
||||
}
|
||||
if (code != XML_ERR_OK) {
|
||||
xmlCtxtErrIO(ctxt, code, filename);
|
||||
return(NULL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user