aboutsummaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 3719066b9..8c39a504a 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -13508,6 +13508,8 @@ init(void)
13508 * 13508 *
13509 * We may end up having both Path and PATH. Then Path will be chosen 13509 * We may end up having both Path and PATH. Then Path will be chosen
13510 * because it appears first. 13510 * because it appears first.
13511 *
13512 * Also, replace backslashes with forward slashes.
13511 */ 13513 */
13512 for (envp = environ; envp && *envp; envp++) 13514 for (envp = environ; envp && *envp; envp++)
13513 if (!strncasecmp(*envp, "PATH=", 5) && 13515 if (!strncasecmp(*envp, "PATH=", 5) &&
@@ -13521,17 +13523,15 @@ init(void)
13521 continue; 13523 continue;
13522 for (start = *envp;start < end;start++) 13524 for (start = *envp;start < end;start++)
13523 *start = toupper(*start); 13525 *start = toupper(*start);
13526 for ( ++end; *end; ++end ) {
13527 if ( *end == '\\' ) {
13528 *end = '/';
13529 }
13530 }
13524 } 13531 }
13525 } 13532 }
13526#endif 13533#endif
13527 for (envp = environ; envp && *envp; envp++) { 13534 for (envp = environ; envp && *envp; envp++) {
13528#if ENABLE_PLATFORM_MINGW32
13529 char *s;
13530
13531 while ((s=strchr(*envp, '\\'))) {
13532 *s = '/';
13533 }
13534#endif
13535 if (strchr(*envp, '=')) { 13535 if (strchr(*envp, '=')) {
13536 setvareq(*envp, VEXPORT|VTEXTFIXED); 13536 setvareq(*envp, VEXPORT|VTEXTFIXED);
13537 } 13537 }