Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.busybox.net/busybox.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash.c')
-rw-r--r--shell/ash.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index ecbfbf091..a33ab0626 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -7011,7 +7011,8 @@ subevalvar(char *start, char *str, int strloc,
slash_pos = -1;
if (repl) {
slash_pos = expdest - ((char *)stackblock() + strloc);
- STPUTC('/', expdest);
+ if (!(flag & EXP_DISCARD))
+ STPUTC('/', expdest);
//bb_error_msg("repl+1:'%s'", repl + 1);
p = argstr(repl + 1, (flag & EXP_DISCARD) | EXP_TILDE); /* EXP_TILDE: echo "${v/x/~}" expands ~ ! */
*repl = '/';