summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEric Andersen2001-03-14 19:33:45 +0000
committerEric Andersen2001-03-14 19:33:45 +0000
commit1ef92685cf52b03935e0c235df1f97845710b587 (patch)
tree9fe0194506ccc2a4ce30d72b82746424777e0bfb /shell
parentce4a586edb6abd90c1036666159f831bd2a58895 (diff)
downloadbusybox-1ef92685cf52b03935e0c235df1f97845710b587.zip
busybox-1ef92685cf52b03935e0c235df1f97845710b587.tar.gz
Yesterday I make strsep_space include post-token whitespace,
so we should not be adding another " " between tokens. -Erik
Diffstat (limited to 'shell')
-rw-r--r--shell/lash.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/shell/lash.c b/shell/lash.c
index 1977d5f..a3003ab 100644
--- a/shell/lash.c
+++ b/shell/lash.c
@@ -1049,13 +1049,12 @@ static int expand_arguments(char *command)
/* Convert from char** (one word per string) to a simple char*,
* but don't overflow command which is BUFSIZ in length */
for (i=0; i < expand_result.gl_pathc; i++) {
- length=strlen(expand_result.gl_pathv[i])+1;
+ length=strlen(expand_result.gl_pathv[i]);
if (BUFSIZ-total_length-length <= 0) {
error_msg(out_of_space);
return FALSE;
}
strcat(command+total_length, expand_result.gl_pathv[i]);
- strcat(command+total_length, " ");
total_length+=length;
}
globfree (&expand_result);