summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorIlya Zakharevich <ilya@math.ohio-state.edu>1997-06-16 11:17:08 +1200
committerTim Bunce <Tim.Bunce@ig.co.uk>1997-08-07 00:00:00 +1200
commit21fc060b433a5fd003b9aca5789342207c46ada4 (patch)
tree16a7833770a037aa66d013de15a7cd2a098b678a /util.c
parentbb679a33295ddbbd6c1f7464a0c6d03212121f26 (diff)
downloadperl-21fc060b433a5fd003b9aca5789342207c46ada4.tar.gz
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
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/util.c b/util.c
index 99eb7e0bd5..fb6c0c0ec7 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 {