From 411d8b4cf9887c108853a25388837c1aaf31edce Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Sun, 18 Mar 2018 19:57:54 +0000 Subject: win32: add a function to convert backslashes to slashes --- shell/ash.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index 778d8bd9d..c7c514417 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -14430,7 +14430,7 @@ init(void) * variable called something other than PATH. This suggests we * haven't been invoked from an earlier instance of BusyBox. */ - char *start, *end, *s; + char *start, *end; struct passwd *pw; for (envp = environ; envp && *envp; envp++) { @@ -14449,11 +14449,7 @@ init(void) /* convert backslashes to forward slashes in value */ if (!xp) { - for ( s=end+1; *s; ++s ) { - if ( *s == '\\' ) { - *s = '/'; - } - } + convert_slashes(end+1); } /* check for invalid characters in name */ -- cgit v1.2.3-55-g6feb