Skip to content

Commit

Permalink
XMl Shell command "cd" does not handle "/" at end of path
Browse files Browse the repository at this point in the history
  • Loading branch information
veillard committed Jul 14, 2014
1 parent 1811add commit 2324330
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions debugXML.c
Original file line number Diff line number Diff line change
Expand Up @@ -3243,7 +3243,12 @@ xmlShell(xmlDocPtr doc, char *filename, xmlShellReadlineFunc input,
ctxt->node = (xmlNodePtr) ctxt->doc;
} else {
#ifdef LIBXML_XPATH_ENABLED
int l;

ctxt->pctxt->node = ctxt->node;
l = strlen(arg);
if ((l >= 2) && (arg[l - 1] == '/'))
arg[l - 1] = 0;
list = xmlXPathEval((xmlChar *) arg, ctxt->pctxt);
#else
list = NULL;
Expand Down

0 comments on commit 2324330

Please sign in to comment.