From 59451394b5b3bb4ccee2b25c6fa5512ba4ca3a19 Mon Sep 17 00:00:00 2001 From: Nguyễn Thái Ngọc Duy Date: Wed, 14 Apr 2010 00:34:05 +0200 Subject: win32: ash: path_advance(): support both colon and semicolon as path separator MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Nguyễn Thái Ngọc Duy --- shell/ash.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'shell') diff --git a/shell/ash.c b/shell/ash.c index da3b6d031..db27cefe5 100644 --- a/shell/ash.c +++ b/shell/ash.c @@ -2261,8 +2261,18 @@ path_advance(const char **path, const char *name) if (*path == NULL) return NULL; start = *path; +#if ENABLE_PLATFORM_MINGW32 + p = next_path_sep(start); + q = strchr(start, '%'); + if ((p && q && q < p) || (!p && q)) + p = q; + if (!p) + for (p = start; *p; p++) + continue; +#else for (p = start; *p && *p != ':' && *p != '%'; p++) continue; +#endif len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ while (stackblocksize() < len) growstackblock(); -- cgit v1.2.3-55-g6feb