aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c10
1 files changed, 10 insertions, 0 deletions
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)
2261 if (*path == NULL) 2261 if (*path == NULL)
2262 return NULL; 2262 return NULL;
2263 start = *path; 2263 start = *path;
2264#if ENABLE_PLATFORM_MINGW32
2265 p = next_path_sep(start);
2266 q = strchr(start, '%');
2267 if ((p && q && q < p) || (!p && q))
2268 p = q;
2269 if (!p)
2270 for (p = start; *p; p++)
2271 continue;
2272#else
2264 for (p = start; *p && *p != ':' && *p != '%'; p++) 2273 for (p = start; *p && *p != ':' && *p != '%'; p++)
2265 continue; 2274 continue;
2275#endif
2266 len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ 2276 len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */
2267 while (stackblocksize() < len) 2277 while (stackblocksize() < len)
2268 growstackblock(); 2278 growstackblock();