GNOME Bugzilla – Bug 750365
Conversion of absolute Windows filepaths to URI is broken
Last modified: 2021-07-05 13:22:48 UTC
If an absolute Windows filepath (such as "C:\Users\") is given to xmlCanonicPath(), an invalid URI is returned ("file:/C:/Users/"). This is a regression from libxml2 2.9.1 (where it returned "file:///C:/Users/"), and most likely caused by fixing bug #731063. A code snippet to reproduce the behavior: char *filename = "C:\\Users\\cmb\\invalid.xml"; xmlDocPtr doc; xmlErrorPtr error; doc = xmlReadFile(filename, NULL, 0); error = xmlGetLastError(); printf("%s\n", error->file); Expected output: file:///C:/Users/cmb/invalid.xml Actual output: file:/C:/Users/cmb/invalid.xml
*** Bug 752219 has been marked as a duplicate of this bug. ***
It's true that it sounds broken but not a windows user at all, best to have a patch discussed on the mailing list xml@gnome.org as this can potentially affect a lot of people https://mail.gnome.org/mailman/listinfo/xml thanks, Daniel
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version, then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/libxml2/-/issues/ Thank you for your understanding and your help.