diff options
-rw-r--r-- | shell/ash.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/shell/ash.c b/shell/ash.c index 5303e15da..e7f4606d4 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
@@ -2170,7 +2170,11 @@ padvance(const char **path, const char *name) | |||
2170 | if (*path == NULL) | 2170 | if (*path == NULL) |
2171 | return NULL; | 2171 | return NULL; |
2172 | start = *path; | 2172 | start = *path; |
2173 | #ifdef __MINGW32__ | ||
2174 | for (p = start; *p && *p != ';' && *p != '%'; p++); | ||
2175 | #else | ||
2173 | for (p = start; *p && *p != ':' && *p != '%'; p++); | 2176 | for (p = start; *p && *p != ':' && *p != '%'; p++); |
2177 | #endif | ||
2174 | len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ | 2178 | len = p - start + strlen(name) + 2; /* "2" is for '/' and '\0' */ |
2175 | while (stackblocksize() < len) | 2179 | while (stackblocksize() < len) |
2176 | growstackblock(); | 2180 | growstackblock(); |
@@ -2184,9 +2188,17 @@ padvance(const char **path, const char *name) | |||
2184 | pathopt = NULL; | 2188 | pathopt = NULL; |
2185 | if (*p == '%') { | 2189 | if (*p == '%') { |
2186 | pathopt = ++p; | 2190 | pathopt = ++p; |
2191 | #ifdef __MINGW32__ | ||
2192 | while (*p && *p != ';') p++; | ||
2193 | #else | ||
2187 | while (*p && *p != ':') p++; | 2194 | while (*p && *p != ':') p++; |
2195 | #endif | ||
2188 | } | 2196 | } |
2197 | #ifdef __MINGW32__ | ||
2198 | if (*p == ';') | ||
2199 | #else | ||
2189 | if (*p == ':') | 2200 | if (*p == ':') |
2201 | #endif | ||
2190 | *path = p + 1; | 2202 | *path = p + 1; |
2191 | else | 2203 | else |
2192 | *path = NULL; | 2204 | *path = NULL; |