From: Ilya Zakharevich Date: Sun, 15 Jun 1997 23:17:08 +0000 (+1200) Subject: Additional patch for "Can't execute ..." X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=21fc060b433a5fd003b9aca5789342207c46ada4;p=p5sagit%2Fp5-mst-13.2.git Additional patch for "Can't execute ..." The patch I sent a couple of hours ago was not enough. In fact delimcpy() was used wrongly when splitting PATH on dosish systems: '\\' is not quoting ';' in PATH. Fortunately, delimcpy() is used in very few places in the source, and never with ';' as delimiter - outside of PATH context. So we just fix delimcpy() when the delimiter is ';'. Enjoy, p5p-msgid: 199707181120.HAA03593@monk.mps.ohio-state.edu private-msgid: 199707191651.MAA04897@monk.mps.ohio-state.edu --- diff --git a/util.c b/util.c index 99eb7e0..fb6c0c0 100644 --- a/util.c +++ b/util.c @@ -279,7 +279,9 @@ xstat() #endif /* LEAKTEST */ -/* copy a string up to some (non-backslashed) delimiter, if any */ +/* copy a string up to some (non-backslashed) delimiter, if any; + If the delimiter is ';', then do not consider backslashes - + used only for PATH on DOSISH systems. */ char * delimcpy(to, toend, from, fromend, delim, retlen) @@ -292,7 +294,7 @@ I32 *retlen; { register I32 tolen; for (tolen = 0; from < fromend; from++, tolen++) { - if (*from == '\\') { + if (*from == '\\' && delim != ';') { if (from[1] == delim) from++; else {