aboutsummaryrefslogtreecommitdiff
path: root/shell/ash.c
diff options
context:
space:
mode:
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-23 00:16:23 +1000
committerNguyễn Thái Ngọc Duy <pclouds@gmail.com>2009-04-23 04:44:43 +1000
commite317e86db3bd3c7eb13564c889cadb7db225f220 (patch)
tree29a1495c21fd6f31f0013759efe0446deb9b3cf2 /shell/ash.c
parent504026949bb07100cce1a019a2867e150344e8b2 (diff)
downloadbusybox-w32-e317e86db3bd3c7eb13564c889cadb7db225f220.tar.gz
busybox-w32-e317e86db3bd3c7eb13564c889cadb7db225f220.tar.bz2
busybox-w32-e317e86db3bd3c7eb13564c889cadb7db225f220.zip
shell/ash: teach it to understand semicolon as path separator
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c12
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;