mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-14 20:01:04 +03:00
XMl Shell command "cd" does not handle "/" at end of path
For https://bugzilla.gnome.org/show_bug.cgi?id=731832 small fix
This commit is contained in:
@ -3243,7 +3243,12 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
|
|||||||
ctxt->node = (xmlNodePtr) ctxt->doc;
|
ctxt->node = (xmlNodePtr) ctxt->doc;
|
||||||
} else {
|
} else {
|
||||||
#ifdef LIBXML_XPATH_ENABLED
|
#ifdef LIBXML_XPATH_ENABLED
|
||||||
|
int l;
|
||||||
|
|
||||||
ctxt->pctxt->node = ctxt->node;
|
ctxt->pctxt->node = ctxt->node;
|
||||||
|
l = strlen(arg);
|
||||||
|
if ((l >= 2) && (arg[l - 1] == '/'))
|
||||||
|
arg[l - 1] = 0;
|
||||||
list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
|
list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
|
||||||
#else
|
#else
|
||||||
list = NULL;
|
list = NULL;
|
||||||
|
Reference in New Issue
Block a user